23 #include <boost/property_tree/ptree_fwd.hpp> 31 #include "boost/date_time/gregorian/gregorian.hpp" 33 #include <date/date.h> 46 explicit Calendar(
const boost::property_tree::ptree& configPt);
52 std::size_t
GetDay()
const;
85 boost::gregorian::date
m_date;
86 std::vector<boost::gregorian::date>
m_holidays;
Calendar(const boost::property_tree::ptree &configPt)
Constructor.
void InitializeHolidays(const boost::property_tree::ptree &configPt)
bool IsHoliday() const
Check if it's a holiday.
bool IsWeekend() const
Check if it's the weekend.
std::vector< date::year_month_day > m_school_holidays
Vector of school holidays.
unsigned short int m_day
Current day since start of simulation.
void AdvanceDay()
Advance the simulated calendar by one day.
std::vector< date::year_month_day > m_holidays
Vector of general holidays.
date::year_month_day m_date
Current simulated date.
std::size_t GetDayOfTheWeek() const
Current day of the week (0 (Sunday), ..., 6 (Saturday)) in the simulated calendar.
std::size_t GetYear() const
Current year in the simulated calendar.
std::size_t GetDay() const
Current day of the month in the simulated calendar.
Class that keeps track of the 'state' of simulated world.
bool IsSchoolHoliday() const
Check if it's a school holiday.
unsigned short int GetSimulationDay() const
Current simulated day since the start of the simulation.
Namespace for the simulator and related classes.
std::size_t GetMonth() const
Current month in the simulated calendar.