NAP
Public Member Functions | Public Attributes | List of all members
YearlyCalendarItem Class Reference

#include <calendaritem.h>

Public Member Functions

 YearlyCalendarItem ()=default
 
 YearlyCalendarItem (const CalendarItem::Point &point, const std::string &title, EMonth month, int day)
 
bool init (utility::ErrorState &errorState) override
 
bool setDate (EMonth month, int day)
 
virtual bool active (SystemTimeStamp timeStamp) const override
 
- Public Member Functions inherited from CalendarItem
 CalendarItem ()=default
 
 CalendarItem (const Point &point, const std::string &title)
 
void setTitle (const std::string &title)
 
const std::string & getTitle () const
 
void setDescription (const std::string &description)
 
const std::string & getDescription () const
 
bool setPoint (const Point &point)
 
const PointgetPoint () const
 
bool setTime (const Time &time)
 
const TimegetTime () const
 
void setDuration (const Time &duration)
 
const TimegetDuration () const
 
- Public Member Functions inherited from Resource
 Resource ()
 
- Public Member Functions inherited from Object
 Object ()
 
virtual ~Object ()
 
virtual void onDestroy ()
 
 Object (Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&)=delete
 
Objectoperator= (Object &&)=delete
 

Public Attributes

int mDay = 1
 Property: 'Day' the day of the month (1-31) More...
 
EMonth mMonth = EMonth::Unknown
 Property: 'Month' month of the year. More...
 
- Public Attributes inherited from CalendarItem
std::string mTitle = ""
 Property: 'Title' item title. More...
 
Point mPoint
 Property; 'Point' point in time together with duration. More...
 
std::string mDescription = ""
 Property: 'Description' item description. More...
 
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
 

Description

Yearly occurring calendar item. For example: Christmas, New Year etc.

Inheritance diagram for YearlyCalendarItem:
[legend]
Collaboration diagram for YearlyCalendarItem:
[legend]

Constructor & Destructor Documentation

◆ YearlyCalendarItem() [1/2]

YearlyCalendarItem ( )
default

◆ YearlyCalendarItem() [2/2]

YearlyCalendarItem ( const CalendarItem::Point point,
const std::string &  title,
EMonth  month,
int  day 
)

Member Function Documentation

◆ active()

virtual bool active ( SystemTimeStamp  timeStamp) const
overridevirtual
Parameters
timeStamptime to validate
Returns
if the unique calender item is active.

Implements CalendarItem.

◆ init()

bool init ( utility::ErrorState errorState)
overridevirtual

Initializes the yearly calendar item. Checks if the is valid.

Returns
if the date is valid

Reimplemented from CalendarItem.

◆ setDate()

bool setDate ( EMonth  month,
int  day 
)

Updates the calendar date, checks if the new date is valid.

Parameters
monthnew month
daynew day in month
Returns
if the date is updated

Member Data Documentation

◆ mDay

int mDay = 1

Property: 'Day' the day of the month (1-31)

◆ mMonth

Property: 'Month' month of the year.