fixedHoliday.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_FIXEDHOLIDAY_HPP
2 #define JULIAN_FIXEDHOLIDAY_HPP
3 
5 
6 namespace julian {
7 
20  class FixedHoliday: public Holiday {
21  public:
27  FixedHoliday(int month,int day):month_(month),day_(day){};
28  virtual bool operator()(Date) const;
29  virtual FixedHoliday* clone() const;
30  virtual std::string info() const;
31  virtual ~FixedHoliday(){};
32  friend class boost::serialization::access;
33  private:
34 
37  template<class Archive>
38  void serialize(Archive & ar, const unsigned int){
39  boost::serialization::base_object<Holiday>(*this);
40  ar & BOOST_SERIALIZATION_NVP(month_);
41  ar & BOOST_SERIALIZATION_NVP(day_);
42  }
43  int month_;
44 
46  int day_;
47  };
49 }
50 #endif
FixedHoliday(int month, int day)
Constructor.
Definition: fixedHoliday.hpp:27
virtual bool operator()(Date) const
Checks if a date is fixed holiday.
Definition: fixedHoliday.cpp:13
Definition: cadHoliday.cpp:3
int day_
day of fixed holiday
Definition: fixedHoliday.hpp:46
Class is an abstract class expressing the concept of holiday calendar for different currencies and st...
Definition: holiday.hpp:22
FixedHoliday()
Default constructor.
Definition: fixedHoliday.hpp:24
Fixed date holiday.
Definition: fixedHoliday.hpp:20
Class implements a date object.
Definition: date.hpp:27
virtual std::string info() const
Informations about class.
Definition: fixedHoliday.cpp:33
void serialize(Archive &ar, const unsigned int)
interface used by Boost serialization library
Definition: fixedHoliday.hpp:38
int month_
month of fixed holiday
Definition: fixedHoliday.hpp:43
File contains definition of Holiday class.
virtual FixedHoliday * clone() const
Virtual copy constructor.
Definition: fixedHoliday.cpp:25