8 #include <boost/archive/text_iarchive.hpp>
9 #include <boost/archive/text_oarchive.hpp>
10 #include <boost/serialization/access.hpp>
18 AirlineClassListKey::AirlineClassListKey() {
26 : _airlineCodeList (iAirlineCodeList), _classCodeList (iClassCodeList) {
31 : _airlineCodeList (iKey._airlineCodeList),
32 _classCodeList (iKey._classCodeList) {
41 ioOut <<
"AirlineClassListKey: " <<
toString() << std::endl;
50 std::ostringstream oStr;
51 assert (_airlineCodeList.size() == _classCodeList.size());
53 unsigned short idx = 0;
54 AirlineCodeList_T::const_iterator itAirlineCode = _airlineCodeList.begin();
55 for (ClassList_StringList_T::const_iterator itClassCode =
56 _classCodeList.begin(); itClassCode != _classCodeList.end();
57 ++itClassCode, ++itAirlineCode, ++idx) {
64 oStr << lAirlineCode <<
" " << lClassCode;
71 void AirlineClassListKey::serialisationImplementationExport()
const {
72 std::ostringstream oStr;
73 boost::archive::text_oarchive oa (oStr);
78 void AirlineClassListKey::serialisationImplementationImport() {
79 std::istringstream iStr;
80 boost::archive::text_iarchive ia (iStr);
85 template<
class Archive>
87 const unsigned int iFileVersion) {
96 AirlineCodeList_T::const_iterator itAirlineCode = _airlineCodeList.begin();
97 for (ClassList_StringList_T::const_iterator itClassCode =
98 _classCodeList.begin(); itClassCode != _classCodeList.end();
99 ++itClassCode, ++itAirlineCode) {
103 ioArchive & lAirlineCode & lClassCode;
109 namespace ba = boost::archive;
110 template void AirlineClassListKey::
111 serialize<ba::text_oarchive> (ba::text_oarchive&,
unsigned int);
112 template void AirlineClassListKey::
113 serialize<ba::text_iarchive> (ba::text_iarchive&,
unsigned int);