KHolidays Library
#include <holidayparserdriver_p.h>
Public Member Functions | |
HolidayParserDriver (const QString &filePath) | |
virtual | ~HolidayParserDriver () |
virtual void | error (const QString &errorMessage) |
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 | |
virtual void | parse () |
virtual void | parseMetadata () |
virtual void | setParseCalendar (const QString &calendarType) |
virtual void | setParseStartEnd () |
Protected Attributes | |
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
HolidayParserDriver abstract base class.
Defines a standard interface for parsing holiday files of various formats
Derived classes must implemet method parse(), other methods should work for most circumstances
Private, for internal use only
Definition at line 44 of file holidayparserdriver_p.h.
Constructor & Destructor Documentation
|
explicit |
Constructor of abstract holiday file parser driver class.
This will be called by derived classes.
- Parameters
-
filePath full path to holiday file
Definition at line 29 of file holidayparserdriver.cpp.
|
virtual |
Destructor.
Definition at line 35 of file holidayparserdriver.cpp.
Member Function Documentation
|
virtual |
Standard error message handling.
- Parameters
-
errorMessage error message to log
Reimplemented in KHolidays::HolidayParserDriverPlan.
Definition at line 97 of file holidayparserdriver.cpp.
|
virtual |
Return the ISO 3166 country/region code of the file.
May be either just a country code ("US" = USA) or may include a regional identifier ("US-CA" = California). Returns "XX" if not a country.
- Returns
- the full country code of the file
Definition at line 40 of file holidayparserdriver.cpp.
|
virtual |
Return the untranslated description of the file if available.
- Returns
- the untranslated description of the file
Definition at line 55 of file holidayparserdriver.cpp.
|
virtual |
Return the ISO 639-1 language code of the file.
May be either just a language code ("en" = US English) or may include a country identifier ("en_GB" = British English).
- Returns
- the language code of the file
Definition at line 45 of file holidayparserdriver.cpp.
|
virtual |
Return the untranslated name of the file.
- Returns
- the untranslated name code of the file
Definition at line 50 of file holidayparserdriver.cpp.
|
protectedvirtual |
Actually parse the file, must be re-implemented by derived classes.
Reimplemented in KHolidays::HolidayParserDriverPlan.
Definition at line 102 of file holidayparserdriver.cpp.
|
virtual |
Return a list of holidays falling between any two dates.
- Parameters
-
startDate start date of the holiday parse range endDate end date of the holiday parse range multidayMode how to return multiday holidays
- Returns
- a list of holidays
Definition at line 60 of file holidayparserdriver.cpp.
|
virtual |
Convenience function Return a list of holidays falling on a given date.
- Parameters
-
date date to return holidays for multidayMode how to return multiday holidays
- Returns
- a list of holidays
Definition at line 75 of file holidayparserdriver.cpp.
|
virtual |
Convenience function Return a list of holidays falling in a given calendar year.
- Parameters
-
calendarYear year to return holidays for calendarType calendar system of year, standard KDE calendar type, see KCalendarSystem multidayMode how to return multiday holidays
- Returns
- a list of holidays
Definition at line 81 of file holidayparserdriver.cpp.
|
protectedvirtual |
Parse the file for metadata only and populate the metadata variables.
Reimplemented in KHolidays::HolidayParserDriverPlan.
Definition at line 106 of file holidayparserdriver.cpp.
|
protectedvirtual |
Set the calendar system to use.
- Parameters
-
calendarType standard KDE calendar type, see KCalendarSystem
Definition at line 110 of file holidayparserdriver.cpp.
|
protectedvirtual |
Initialise parse year variables for calendar system.
Definition at line 116 of file holidayparserdriver.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.