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

QuantLib::DayCounter Class Reference

#include <daycounter.hpp>

Inheritance diagram for QuantLib::DayCounter:

QuantLib::Bridge< T, T_impl > QuantLib::Actual360 QuantLib::Actual365Fixed QuantLib::ActualActual QuantLib::OneDayCounter QuantLib::SimpleDayCounter QuantLib::Thirty360

List of all members.

Detailed Description

day counter class

This class provides methods for determining the length of a time period according to given market convention, both as a number of days and as a year fraction.

The Bridge pattern is used to provide the base behavior of the day counter.

Definition at line 56 of file daycounter.hpp.

Public Types

typedef T_impl Impl

Public Member Functions

 DayCounter ()
bool empty () const
bool isNull () const
DayCounter interface
BigInteger dayCount (const Date &, const Date &) const
 Returns the number of days between two dates.
std::string name () const
 Returns the name of the day counter.
Time yearFraction (const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
 Returns the period between two dates as a fraction of year.

Protected Member Functions

 DayCounter (const boost::shared_ptr< DayCounterImpl > &impl)

Protected Attributes

boost::shared_ptr< Impl > impl_

Related Functions

(Note that these are not member functions.)

bool operator!= (const DayCounter &, const DayCounter &)
std::ostream & operator<< (std::ostream &, const DayCounter &)
bool operator== (const DayCounter &, const DayCounter &)

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

Generated by  Doxygen 1.6.0   Back to index