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

Public Member Functions | Private Attributes | Related Functions

QuantLib::Period Class Reference

#include <period.hpp>

List of all members.

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* (Integer n, const Period &)
Period operator* (const Period &, Integer n)
template<typename T >
Period operator* (T n, TimeUnit units)
template<typename T >
Period operator* (TimeUnit units, T n)
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 &)

Detailed Description

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

Test:
self-consistency of algebra is checked.

Definition at line 44 of file period.hpp.


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

Generated by  Doxygen 1.6.0   Back to index