Documents > BPS V2 C++ API
BpsSchedule Class Reference

Schedule object processing. More...

#include <bpsschedule.h>

List of all members.

Public Member Functions

 BpsSchedule ()
 Default constructor.
 BpsSchedule (const BpsSchedule &aOther)
 Copy constructor.
 BpsSchedule (const QString &aCronText)
QString cronText () const
bool dayOfMonth (int aDayOfMonth) const
QDateTime firstDateTime (const QDate &aDate) const
 Find the first date/time for a given date.
QTime firstTime () const
bool hour (int aHour) const
bool isDateIncluded (const QDate &aDate) const
 Check if a date is included in the schedule.
bool isDateTimeIncluded (const QDateTime &aDateTime) const
 Check if a date/time is included in the schedule.
QDateTime lastDateTime (const QDate &aDate) const
 Find the last date/time for a given date.
QTime lastTime () const
bool minute (int aMinute) const
bool month (int aMonth) const
bool month (const QString &aMonth) const
QDate nextDate (const QDate &aStart) const
 Find the next schedule date after the given start date.
QDateTime nextDateTime (const QDateTime &aStart) const
 Find the next schedule date/time after the given start date/time.
BpsScheduleoperator= (const BpsSchedule &aOther)
 Assign from other schedule.
QDate previousDate (const QDate &aStart) const
 Find the previous schedule date before the given start date.
QDateTime previousDateTime (const QDateTime &aStart) const
 Find the previous schedule date/time before the given start date/time.
void setCronText (const QString &aCronText)
 Set schedule by a CRON text.
void setDayOfMonth (int aDayOfMonth, bool aEnable)
 Change the enable state of a day of month.
void setHour (int aHour, bool aEnable)
 Change the enable state of a hour.
void setMinute (int aMinute, bool aEnable)
 Change the enable state of a minute.
void setMonth (int aMonth, bool aEnable)
 Change the enable state of a month.
void setMonth (const QString &aMonth, bool aEnable)
 Change the enable state of a month.
void setWeekday (int aWeekday, bool aEnable)
 Change the enable state of a weekday.
void setWeekday (const QString &aWeekday, bool aEnable)
 Change the enable state of a weekday.
bool weekday (int aWeekday) const
bool weekday (const QString &aWeekday) const

Detailed Description

Schedule object processing.


Constructor & Destructor Documentation

BpsSchedule::BpsSchedule ( const BpsSchedule aOther)

Copy constructor.

Parameters:
aOtherThe other schedule to clone.
BpsSchedule::BpsSchedule ( const QString &  aCronText)
Parameters:
aCronTextThe CRON text representation.

Member Function Documentation

QString BpsSchedule::cronText ( ) const
Returns:
The CRON text representation of the schedule.
bool BpsSchedule::dayOfMonth ( int  aDayOfMonth) const
Parameters:
[in]aDayOfMonthMust be in the range 1 ... 31
Returns:
Element enable status.
QDateTime BpsSchedule::firstDateTime ( const QDate &  aDate) const

Find the first date/time for a given date.

Parameters:
[in]aDateThe date.
Returns:
The first date/time, or an invalid date/time if not found.
QTime BpsSchedule::firstTime ( ) const
Returns:
The first time, or an invalid time if none.
bool BpsSchedule::hour ( int  aHour) const
Parameters:
[in]aHourMust be in the range 0 ... 23
Returns:
Element enable status.
bool BpsSchedule::isDateIncluded ( const QDate &  aDate) const

Check if a date is included in the schedule.

Parameters:
[in]aDateThe date to check.
Returns:
True if the date is included in the schedule
bool BpsSchedule::isDateTimeIncluded ( const QDateTime &  aDateTime) const

Check if a date/time is included in the schedule.

Parameters:
[in]aDateTimeThe date/time to check.
Returns:
True if the date/time is included in the schedule
QDateTime BpsSchedule::lastDateTime ( const QDate &  aDate) const

Find the last date/time for a given date.

Parameters:
[in]aDateThe date.
Returns:
The last date/time, or an invalid date/time if not found.
QTime BpsSchedule::lastTime ( ) const
Returns:
The last time, or an invalid time if none.
bool BpsSchedule::minute ( int  aMinute) const
Parameters:
[in]aMinuteMust be in the range 0 ... 59
Returns:
Element enable status.
bool BpsSchedule::month ( int  aMonth) const
Parameters:
[in]aMonthMust be in the range 1 ... 12
Returns:
Element enable status.
bool BpsSchedule::month ( const QString &  aMonth) const
Parameters:
[in]aMonthMust be one of: jan feb mar apr may jun jul aug sep oct nov dec
Returns:
Element enable status.
QDate BpsSchedule::nextDate ( const QDate &  aStart) const

Find the next schedule date after the given start date.

Parameters:
[in]aStartThe date to start searching from.
Returns:
The next date found, or an invalid date if no next date found.
QDateTime BpsSchedule::nextDateTime ( const QDateTime &  aStart) const

Find the next schedule date/time after the given start date/time.

Parameters:
[in]aStartThe date/time to start searching from.
Returns:
The next date and time found, or an invalid date/time if none found.
BpsSchedule& BpsSchedule::operator= ( const BpsSchedule aOther)

Assign from other schedule.

Parameters:
[in]aOtherThe other schedule to copy.
Returns:
Reference to the current object.
QDate BpsSchedule::previousDate ( const QDate &  aStart) const

Find the previous schedule date before the given start date.

Parameters:
[in]aStartThe date to start searching from.
Returns:
The previous date found, or an invalid date if no next date found.
QDateTime BpsSchedule::previousDateTime ( const QDateTime &  aStart) const

Find the previous schedule date/time before the given start date/time.

Parameters:
[in]aStartThe date/time to start searching from.
Returns:
The previous date found, or an invalid date/time if none found.
void BpsSchedule::setCronText ( const QString &  aCronText)

Set schedule by a CRON text.

Parameters:
[in]aCronTextThe CRON text.
void BpsSchedule::setDayOfMonth ( int  aDayOfMonth,
bool  aEnable 
)

Change the enable state of a day of month.

Parameters:
[in]aDayOfMonthMust be in the range 1 ... 31
[in]aEnableThe new enable state to set.
void BpsSchedule::setHour ( int  aHour,
bool  aEnable 
)

Change the enable state of a hour.

Parameters:
[in]aHourMust be in the range 0 ... 23
[in]aEnableThe new enable state to set.
void BpsSchedule::setMinute ( int  aMinute,
bool  aEnable 
)

Change the enable state of a minute.

Parameters:
[in]aMinuteMust be in the range 0 ... 59
[in]aEnableThe new enable state to set.
void BpsSchedule::setMonth ( int  aMonth,
bool  aEnable 
)

Change the enable state of a month.

Parameters:
[in]aMonthMust be in the range 1 ... 12
[in]aEnableThe new enable state to set.
void BpsSchedule::setMonth ( const QString &  aMonth,
bool  aEnable 
)

Change the enable state of a month.

Parameters:
[in]aMonthMust be one of: jan feb mar apr may jun jul aug sep oct nov dec
[in]aEnableThe new enable state to set.
void BpsSchedule::setWeekday ( int  aWeekday,
bool  aEnable 
)

Change the enable state of a weekday.

Parameters:
[in]aWeekdayMust be in the range 0 ... 7, where 0/7 = sun, 1 = mon, 2 = tue, etc.
[in]aEnableThe new enable state to set.
void BpsSchedule::setWeekday ( const QString &  aWeekday,
bool  aEnable 
)

Change the enable state of a weekday.

Parameters:
[in]aWeekdayMust be one of: sun mon tue wed thu fri sat
[in]aEnableThe new enable state to set.
bool BpsSchedule::weekday ( int  aWeekday) const
Parameters:
[in]aWeekdayMust be in the range 0 ... 7, where 0/7 = sun, 1 = mon, 2 = tue, etc.
Returns:
Element enable status.
bool BpsSchedule::weekday ( const QString &  aWeekday) const
Parameters:
[in]aWeekdayMust be one of: sun mon tue wed thu fri sat
Returns:
Element enable status.

The documentation for this class was generated from the following file: