Dv::Period Class Reference

A Period is simply a Date with a Duration. More...

#include <period.h>

Collaboration diagram for Dv::Period:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Period (const Date &start, const Duration &size)
 Constructor.
 Period (Date start, Date end) throw (std::runtime_error)
 Constructor, the duration will be such that start + size = end.
Date start () const
 Start date of period.
Date end () const
 End date of period, i.e.
const Durationsize () const
 Size of period.

Private Attributes

Date start_
Duration size_

Detailed Description

A Period is simply a Date with a Duration.

It can be thought of as a half open interval [start, .. start+duration[

Definition at line 72 of file period.h.


Constructor & Destructor Documentation

Dv::Period::Period ( const Date start,
const Duration size 
) [inline]

Constructor.

Parameters:
start date
size of period

Definition at line 78 of file period.h.

Dv::Period::Period ( Date  start,
Date  end 
) throw (std::runtime_error)

Constructor, the duration will be such that start + size = end.

Parameters:
start of period
end of period

Member Function Documentation

Date Dv::Period::start (  )  const [inline]

Start date of period.

Definition at line 86 of file period.h.

References start_.

Date Dv::Period::end (  )  const

End date of period, i.e.

start + size.

const Duration& Dv::Period::size (  )  const [inline]

Size of period.

Definition at line 90 of file period.h.

References size_.


Member Data Documentation

Definition at line 92 of file period.h.

Referenced by start().

Definition at line 93 of file period.h.

Referenced by size().


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

dvutil-1.0.10 [ 5 December, 2009]