KHolidays Library
#include <holidayparserdriverplan_p.h>
Public Member Functions | |
HolidayParserDriverPlan (const QString &planFilename) | |
~HolidayParserDriverPlan () | |
void | error (const KHolidays::location &errorLocation, const QString &errorMessage) |
void | error (const QString &errorMessage) |
Public Member Functions inherited from KHolidays::HolidayParserDriver | |
HolidayParserDriver (const QString &filePath) | |
virtual | ~HolidayParserDriver () |
virtual QString | fileCountryCode () const |
virtual QString | fileDescription () const |
virtual QString | fileLanguageCode () const |
virtual QString | fileName () const |
virtual Holiday::List | parseHolidays (const QDate &startDate, const QDate &endDate, Holiday::MultidayMode multidayMode) |
virtual Holiday::List | parseHolidays (const QDate &date, Holiday::MultidayMode multidayMode) |
virtual Holiday::List | parseHolidays (int calendarYear, const QString &calendarType, Holiday::MultidayMode multidayMode) |
Protected Member Functions | |
int | adjustedMonthNumber (int month) |
QString | filePath () |
std::string * | fileToParse () const |
bool | isLeapYear (int year) |
int | julianDayFromEaster () |
int | julianDayFromEventName (const QString &eventName) |
int | julianDayFromMonthDay (int month, int day) |
int | julianDayFromPascha () |
int | julianDayFromRelativeWeekday (int occurrence, int weekday, int jd) |
int | julianDayFromWeekdayInMonth (int occurrence, int weekday, int month) |
void | parse () |
void | parseMetadata () |
int | parseYear () |
void | setEvent (int event_jd, int observe_offset, int duration) |
void | setEventCalendarType (const QString &calendarType="gregorian") |
void | setEventCategory (const QString &category) |
void | setEventDate (int eventYear, int eventMonth, int eventDay) |
void | setEventDate (int jd) |
void | setEventName (const QString &eventName) |
void | setFileCountryCode (const QString &countryCode) |
void | setFileDescription (const QString &description) |
void | setFileLanguageCode (const QString &languageCode) |
void | setFileName (const QString &ame) |
void | setFromDate (int offset, int condition, int duration) |
void | setFromEaster (int offset, int duration) |
void | setFromPascha (int offset, int duration) |
void | setFromRelativeWeekday (int occurrence, int weekday, int offset, int duration) |
void | setFromWeekdayInMonth (int occurrence, int weekday, int month, int offset, int duration) |
Protected Member Functions inherited from KHolidays::HolidayParserDriver | |
virtual void | setParseCalendar (const QString &calendarType) |
virtual void | setParseStartEnd () |
Additional Inherited Members | |
Protected Attributes inherited from KHolidays::HolidayParserDriver | |
QString | m_fileCountryCode |
QString | m_fileDescription |
QString | m_fileLanguageCode |
QString | m_fileName |
QString | m_filePath |
Holiday::MultidayMode | m_multidayMode |
KCalendarSystem * | m_parseCalendar |
int | m_parseEndYear |
int | m_parseStartYear |
int | m_parseYear |
QDate | m_requestEnd |
QDate | m_requestStart |
Holiday::List | m_resultList |
Detailed Description
HolidayParserDriverPlan implementation class.
Implements the standard driver interface for parsing Plan holiday files as implemented in KDE SC 4.5 onwards. This includes extensions to the file format to support non-Gregorian calendar systems, metadata, and other new features.
Implemented using Bison/Flex and the Bison C++ skeleton v2.1a, see README. While almost all code is new, the structure of the parser is based on the original Plan parser.
Private, for internal use only
Definition at line 53 of file holidayparserdriverplan_p.h.
Constructor & Destructor Documentation
HolidayParserDriverPlan::HolidayParserDriverPlan | ( | const QString & | planFilename | ) |
Constructor of Plan file parser driver.
- Parameters
-
filePath full path to holiday file
Definition at line 53 of file holidayparserdriverplan.cpp.
HolidayParserDriverPlan::~HolidayParserDriverPlan | ( | ) |
Destructor.
Definition at line 72 of file holidayparserdriverplan.cpp.
Member Function Documentation
void HolidayParserDriverPlan::error | ( | const KHolidays::location & | errorLocation, |
const QString & | errorMessage | ||
) |
Bison C++ skeleton error message handling.
- Parameters
-
errorMessage error message to log
Definition at line 80 of file holidayparserdriverplan.cpp.
|
virtual |
Standard error message handling.
- Parameters
-
errorMessage error message to log
Reimplemented from KHolidays::HolidayParserDriver.
Definition at line 88 of file holidayparserdriverplan.cpp.
|
protectedvirtual |
Actually parse the file, new plan format implementation.
Reimplemented from KHolidays::HolidayParserDriver.
Definition at line 94 of file holidayparserdriverplan.cpp.
|
protectedvirtual |
Parse the file for metadata only and populate the metadata variables.
Reimplemented from KHolidays::HolidayParserDriver.
Definition at line 120 of file holidayparserdriverplan.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.