eepgwde::detail::Calendars Struct Reference

Implementation class to provide an extension. More...

#include <eleve/src/runtime0.hpp>

Inheritance diagram for eepgwde::detail::Calendars:

eepgwde::daemon::Q

List of all members.

Public Member Functions

fs::path path () const
 Get path for definition files.
fs::path path (const fs::path &path_) throw (std::exception)
 Set path for definition files.
QuantLib::Calendar make (QuantLib::Calendar const *dummy, const std::string &name_) throw (std::exception)
 Returns a BespokeCalendar.
QuantLib::Calendar make (QuantLib::Calendar const *dummy, const fs::path &name_) throw (std::exception)
 Returns a BespokeCalendar.
std::set< QuantLib::Date > set_difference (const QuantLib::Calendar &a, const QuantLib::Calendar &b, const QuantLib::Date &from_, const QuantLib::Date &to_) throw (std::exception)
 Returns a set of dates which are not holidays in both calendars.
std::set< QuantLib::Date > dates ()
std::pair< QuantLib::Date,
QuantLib::Date > 
added (QuantLib::Calendar const &c) throw (std::exception)
 Returns the first and late dates of the added holidays in a Calendar.
const std::string & id () const
const std::map< const
std::string,
QuantLib::Calendar > & 
mismatches () const
const std::map< const
std::string,
QuantLib::Calendar > & 
mismatches (const std::map< const std::string, QuantLib::Calendar > &)
const std::map< const
std::string,
QuantLib::Calendar > & 
fix () throw (std::exception)
const std::map< const
std::string,
QuantLib::Calendar > & 
fix (const fs::path &path_) throw (std::exception)

Protected Member Functions

 Calendars () throw (std::exception)
virtual ~Calendars () throw (std::exception)

Protected Attributes

const boost::shared_ptr
< eepgwde::detail::Calendars::Impl
impl

Friends

class Impl
 a pointer to an implementation

Classes

class  Impl


Detailed Description

Implementation class to provide an extension.

Definition at line 47 of file runtime0.hpp.


Constructor & Destructor Documentation

eepgwde::detail::Calendars::Calendars (  )  throw (std::exception) [protected]

Definition at line 291 of file runtime0.cpp.

References impl.

eepgwde::detail::Calendars::~Calendars (  )  throw (std::exception) [protected, virtual]

Definition at line 295 of file runtime0.cpp.


Member Function Documentation

fs::path eepgwde::detail::Calendars::path (  )  const

Get path for definition files.

Definition at line 380 of file runtime0.cpp.

References impl.

Referenced by fix(), and path().

fs::path eepgwde::detail::Calendars::path ( const fs::path &  path_  )  throw (std::exception)

Set path for definition files.

Definition at line 385 of file runtime0.cpp.

References impl, and path().

QuantLib::Calendar eepgwde::detail::Calendars::make ( QuantLib::Calendar const *  dummy,
const std::string &  name_ 
) throw (std::exception)

Returns a BespokeCalendar.

Returns a Calendar for a given string.

A BespokeCalendar is returned. This uses files to specify the holidays and weekends.

Note:
Throws a runtime_error exception if files not found. This won't be thread-safe. A common implementation is used.
Parameters:
dummy this is used as a default return.

< Uses a cast operator

< Uses a cast operator

Definition at line 317 of file runtime0.cpp.

Referenced by fix().

QuantLib::Calendar eepgwde::detail::Calendars::make ( QuantLib::Calendar const *  dummy,
const fs::path &  name_ 
) throw (std::exception)

Returns a BespokeCalendar.

Definition at line 298 of file runtime0.cpp.

References eepgwde::daemon::detail::suffix.

std::set< QuantLib::Date > eepgwde::detail::Calendars::set_difference ( const QuantLib::Calendar &  a,
const QuantLib::Calendar &  b,
const QuantLib::Date &  from_,
const QuantLib::Date &  to_ 
) throw (std::exception)

Returns a set of dates which are not holidays in both calendars.

As a side-effect, it caches the calendar pointers and the result in the implementation for latter use.

Definition at line 396 of file runtime0.cpp.

References impl.

std::set< QuantLib::Date > eepgwde::detail::Calendars::dates (  ) 

Definition at line 391 of file runtime0.cpp.

References impl.

Referenced by fix().

std::pair< QuantLib::Date, QuantLib::Date > eepgwde::detail::Calendars::added ( QuantLib::Calendar const &  c  )  throw (std::exception)

Returns the first and late dates of the added holidays in a Calendar.

Definition at line 359 of file runtime0.cpp.

References QuantLib::NCalendar::added().

const std::string & eepgwde::detail::Calendars::id (  )  const

Definition at line 375 of file runtime0.cpp.

References impl.

const std::map< const std::string, QuantLib::Calendar > & eepgwde::detail::Calendars::mismatches (  )  const

Returns a map of Summit calendar strings and QuantLib Calendar objects.

The current list of QuantLib Calendar objects that are used for LIBOR indices and need to have calendar adjustments.

To apply these changes use the method: fix().

Definition at line 420 of file runtime0.cpp.

References eepgwde::daemon::mismatches.

Referenced by fix(), and mismatches().

const std::map< const std::string, QuantLib::Calendar > & eepgwde::detail::Calendars::mismatches ( const std::map< const std::string, QuantLib::Calendar > &  m  ) 

Returns a map of Summit calendar strings and QuantLib Calendar objects.

The current list of QuantLib Calendar objects that are used for LIBOR indices and need to have calendar adjustments.

To apply these changes use the method: fix().

Definition at line 425 of file runtime0.cpp.

References mismatches(), and eepgwde::daemon::mismatches.

const std::map< const std::string, QuantLib::Calendar > & eepgwde::detail::Calendars::fix (  )  throw (std::exception)

Fix the QuantLib Calendars.

Each of the QuantLib::Calendar objects listed by the mismatches() function will be fixed.

The Summit calendars will need to be initialized. And this requires that path() should have been called.

Returns the list.

Definition at line 430 of file runtime0.cpp.

References path().

const std::map< const std::string, QuantLib::Calendar > & eepgwde::detail::Calendars::fix ( const fs::path &  path_  )  throw (std::exception)

Fix the QuantLib Calendars.

Each of the QuantLib::Calendar objects listed by the mismatches() function will be fixed.

The Summit calendars will need to be initialized.

Returns the list.

Definition at line 436 of file runtime0.cpp.

References cal, dates(), make(), mismatches(), and path().


Friends And Related Function Documentation

friend class Impl [friend]

a pointer to an implementation

Definition at line 48 of file runtime0.hpp.


Member Data Documentation

Definition at line 133 of file runtime0.hpp.

Referenced by Calendars(), dates(), id(), path(), and set_difference().


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

Generated on Thu Feb 18 21:30:12 2010 for eleve by  doxygen 1.5.6