8 #include <boost/date_time/gregorian/formatters.hpp>
10 #include <boost/archive/text_iarchive.hpp>
11 #include <boost/archive/text_oarchive.hpp>
12 #include <boost/serialization/access.hpp>
27 OnDDateKey::OnDDateKey()
34 : _OnDStringList (iOnDStringList) {
39 : _OnDStringList (iKey._OnDStringList) {
48 assert(_OnDStringList.empty() ==
false);
49 const OnDString_T& lFrontOnDString = _OnDStringList.front();
55 assert(_OnDStringList.empty() ==
false);
56 const OnDString_T& lFrontOnDString = _OnDStringList.front();
62 assert(_OnDStringList.empty() ==
false);
63 const OnDString_T& lLastOnDString = _OnDStringList.back();
69 ioOut <<
"OnDDateKey: " <<
toString();
78 std::ostringstream oStr;
79 for (OnDStringList_T::const_iterator itOnDString = _OnDStringList.begin();
80 itOnDString != _OnDStringList.end(); ++itOnDString){
81 oStr << *itOnDString <<
" ";
87 void OnDDateKey::serialisationImplementationExport()
const {
88 std::ostringstream oStr;
89 boost::archive::text_oarchive oa (oStr);
94 void OnDDateKey::serialisationImplementationImport() {
95 std::istringstream iStr;
96 boost::archive::text_iarchive ia (iStr);
101 template<
class Archive>
103 const unsigned int iFileVersion) {
113 namespace ba = boost::archive;
114 template void OnDDateKey::serialize<ba::text_oarchive> (ba::text_oarchive&,
116 template void OnDDateKey::serialize<ba::text_iarchive> (ba::text_iarchive&,
void toStream(std::ostream &ioOut) const
LocationCode_T AirportCode_T
const AirportCode_T & getOffPoint() const
Handle on the StdAir library context.
void serialize(Archive &ar, const unsigned int iFileVersion)
Key of a given O&D-date, made of a list of OnD strings. a OnD string contains the airline code...
void fromStream(std::istream &ioIn)
const Date_T & getDepartureDate() const
static FlightDateKey extractFlightDateKey(const std::string &iFullKeyStr)
const std::string toString() const
boost::gregorian::date Date_T
const AirportCode_T getOrigin() const
const Date_T getDate() const
const AirportCode_T & getBoardingPoint() const
std::list< OnDString_T > OnDStringList_T
const OnDStringList_T DEFAULT_OND_STRING_LIST
const AirportCode_T getDestination() const
static SegmentDateKey extractSegmentDateKey(const std::string &iFullKeyStr)