compounding.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_COMPOUNDING_HPP
2 #define JULIAN_COMPOUNDING_HPP
3 
4 #include <string>
5 #include <utils/smartPointer.hpp>
6 #include <boost/serialization/assume_abstract.hpp>
7 #include <boost/serialization/access.hpp>
8 #include <boost/serialization/base_object.hpp>
9 #include <boost/serialization/export.hpp>
10 namespace julian {
11 
23  class Compounding {
24  public:
31 
37  virtual double getCapitalization(double interest_rate, double accrual_time) const= 0;
43  virtual double getRate(double future_value,double accrual_time) const = 0;
44 
50  virtual Compounding* clone() const = 0;
51 
56  virtual ~Compounding(){};
57 
62  virtual std::string info() const = 0;
63 
64 
65  friend class boost::serialization::access;
66  private:
67 
70  template<class Archive>
71  void serialize(Archive & , const unsigned int) {
72  }
73  };
74 }
75 #endif
File contains template of deep-coping smart pointer.
virtual double getCapitalization(double interest_rate, double accrual_time) const =0
Calculates future value.
Definition: cadHoliday.cpp:3
Compounding()
Default constructor.
Definition: compounding.hpp:30
virtual std::string info() const =0
Info about class.
Class is an abstract class expressing the concept of compounding interest rate.
Definition: compounding.hpp:23
virtual double getRate(double future_value, double accrual_time) const =0
Calculates interest rate.
virtual Compounding * clone() const =0
Virtual copy constructor.
virtual ~Compounding()
Destructor.
Definition: compounding.hpp:56
void serialize(Archive &, const unsigned int)
interface used by Boost serialization library
Definition: compounding.hpp:71