Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

QuantLib::Period Class Reference

#include <period.hpp>

List of all members.

Detailed Description

This class provides a Period (length + TimeUnit) class and implements a limited algebra.

self-consistency of algebra is checked.

Definition at line 44 of file period.hpp.

Public Member Functions

Frequency frequency () const
Integer length () const
void normalize ()
Periodoperator+= (const Period &)
Periodoperator-= (const Period &)
Periodoperator/= (Integer)
 Period (Frequency f)
 Period (Integer n, TimeUnit units)
TimeUnit units () const

Private Attributes

Integer length_
TimeUnit units_

Related Functions

(Note that these are not member functions.)

Real days (const Period &)
Real months (const Period &)
bool operator!= (const Period &, const Period &)
Period operator* (const Period &, Integer n)
Period operator* (Integer n, const Period &)
template<typename T>
Period operator* (TimeUnit units, T n)
template<typename T>
Period operator* (T n, TimeUnit units)
Period operator+ (const Period &, const Period &)
Period operator- (const Period &, const Period &)
Period operator- (const Period &)
Period operator/ (const Period &, Integer n)
bool operator< (const Period &, const Period &)
std::ostream & operator<< (std::ostream &, const Period &)
bool operator<= (const Period &, const Period &)
bool operator== (const Period &, const Period &)
bool operator> (const Period &, const Period &)
bool operator>= (const Period &, const Period &)
Real weeks (const Period &)
Real years (const Period &)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index