tenor.hpp
Go to the documentation of this file.
1 #ifndef JULIAN_TENOR_HPP
2 #define JULIAN_TENOR_HPP
3 
4 #include <dates/timeUnit.hpp>
5 #include <iostream>
6 #include <string>
7 #include <boost/archive/text_oarchive.hpp>
8 #include <boost/archive/text_iarchive.hpp>
14 namespace julian {
15 
23  class Tenor {
24  public:
25  Tenor();
26  Tenor(TimeUnit);
27  Tenor(int,TimeUnit);
28 
29  Tenor(std::string);
31 
32  int getNumberOfUnits() const;
33  TimeUnit getTimeUnit() const;
34 
35  operator std::string() const;
36 
37  friend std::ostream& operator<<(std::ostream&, Tenor&);
38 
39  private:
42  };
43 }
44 #endif
45 
TimeUnit
Definition: timeUnit.hpp:21
Definition: cadHoliday.cpp:3
Tenor()
Constructor.
Definition: tenor.cpp:10
TimeUnit unit_
This variable holds type of time unit.
Definition: tenor.hpp:40
int getNumberOfUnits() const
returns number of time units
Definition: tenor.cpp:78
Class implements a tenor object.
Definition: tenor.hpp:23
friend std::ostream & operator<<(std::ostream &, Tenor &)
Prints tenor.
Definition: tenor.cpp:94
Tenor operator=(TimeUnit)
Creates tenor by time unit as rvalue.
Definition: tenor.cpp:121
int number_of_units_
This integer represents number of time units.
Definition: tenor.hpp:41
File contain time units and other useful enumerations.
TimeUnit getTimeUnit() const
returns time unit
Definition: tenor.cpp:86