00001 00009 #ifndef eleve_facilities0_hpp 00010 #define eleve_facilities0_hpp 00011 00012 #include "eleve/config.hpp" 00013 00014 #include <string> 00015 #include <stdexcept> 00016 00017 #include <boost/filesystem.hpp> 00018 #include <boost/shared_ptr.hpp> 00019 00020 #include <ql/time/calendars/target.hpp> 00021 00026 00027 namespace eepgwde { 00028 00032 bool operator== (QuantLib::Calendar const & a, QuantLib::Calendar const & b) 00033 throw(std::invalid_argument); 00034 00038 bool operator!= (QuantLib::Calendar const & a, QuantLib::Calendar const & b) 00039 throw(std::invalid_argument); 00040 00041 } 00042 00043 namespace eepgwde { namespace detail { 00044 namespace fs = boost::filesystem; 00045 00047 struct Calendars { 00048 class Impl; 00049 friend class Impl; 00050 00052 fs::path path() const; 00053 00055 fs::path path(const fs::path & path_) throw(std::exception); 00056 00058 QuantLib::Calendar make(QuantLib::Calendar const * dummy, 00059 const std::string & name_) 00060 throw(std::exception); 00061 00063 QuantLib::Calendar make(QuantLib::Calendar const * dummy, 00064 const fs::path & name_) 00065 throw(std::exception); 00066 00072 std::set<QuantLib::Date> 00073 set_difference(const QuantLib::Calendar & a, 00074 const QuantLib::Calendar & b, 00075 const QuantLib::Date & from_, 00076 const QuantLib::Date & to_) 00077 throw(std::exception); 00078 00079 std::set<QuantLib::Date> dates(); 00080 00083 std::pair<QuantLib::Date, QuantLib::Date> 00084 added(QuantLib::Calendar const & c) 00085 throw(std::exception); 00086 00087 const std::string & id() const; 00088 00095 const std::map<const std::string, QuantLib::Calendar> & 00096 mismatches() const; 00097 00104 const std::map<const std::string, QuantLib::Calendar> & 00105 mismatches(const std::map<const std::string, QuantLib::Calendar> &); 00106 00116 const std::map<const std::string, QuantLib::Calendar> & fix() 00117 throw (std::exception); 00118 00127 const std::map<const std::string, QuantLib::Calendar> & 00128 fix(const fs::path & path_) throw(std::exception); 00129 00130 protected: 00131 Calendars() throw(std::exception); 00132 virtual ~Calendars() throw(std::exception); 00133 const boost::shared_ptr<eepgwde::detail::Calendars::Impl> impl; 00134 }; 00135 00136 } } 00137 00139 00140 #endif 00141 00142 00143