yearFraction.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_YEARFRACTION_HPP
2 #define JULIAN_YEARFRACTION_HPP
3 
4 #include <dates/date.hpp>
5 #include <utils/smartPointer.hpp>
6 
7 #include <iostream>
8 #include <string>
9 #include <boost/serialization/assume_abstract.hpp>
10 #include <boost/serialization/access.hpp>
11 #include <boost/serialization/base_object.hpp>
12 #include <boost/serialization/export.hpp>
13 
14 namespace julian {
15 
28  class YearFraction {
29  public:
30 
36 
41  virtual double operator()(const Date& ,const Date&) const = 0;
42 
47  virtual YearFraction* clone() const = 0;
48 
53  virtual std::string info() const = 0;
54 
59  virtual ~YearFraction(){};
60 
61  friend class boost::serialization::access;
62  private:
63 
66  template<class Archive>
67  void serialize(Archive & , const unsigned int) {
68  }
69  };
70 } // namespace julian
71 
72 #endif
virtual std::string info() const =0
info about class
File contains template of deep-coping smart pointer.
This class is an abstract class expressing the concept of calculating year fraction.
Definition: yearFraction.hpp:28
Definition: cadHoliday.cpp:3
File contains definition of date class.
virtual YearFraction * clone() const =0
Virtual copy constructor.
void serialize(Archive &, const unsigned int)
interface used by Boost serialization library
Definition: yearFraction.hpp:67
virtual double operator()(const Date &, const Date &) const =0
Calculates year fraction.
Class implements a date object.
Definition: date.hpp:27
YearFraction()
Constructor.
Definition: yearFraction.hpp:35
virtual ~YearFraction()
Destructor.
Definition: yearFraction.hpp:59