StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
BomArchive.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <cassert>
6 #include <sstream>
7 // Boost.Serialization
8 #include <boost/archive/tmpdir.hpp>
9 #include <boost/archive/text_iarchive.hpp>
10 #include <boost/archive/text_oarchive.hpp>
11 #include <boost/serialization/base_object.hpp>
12 #include <boost/serialization/utility.hpp>
13 #include <boost/serialization/list.hpp>
14 //#include <boost/serialization/assume_abstract.hpp>
15 // StdAir
16 #include <stdair/bom/BomRoot.hpp>
17 #include <stdair/bom/Inventory.hpp>
19 #include <stdair/bom/LegDate.hpp>
21 #include <stdair/bom/LegCabin.hpp>
28 
29 namespace stdair {
30 
31  // ////////////////////////////////////////////////////////////////////
32  void BomArchive::archive (const BomRoot& iBomRoot) {
33  }
34 
35  // ////////////////////////////////////////////////////////////////////
36  std::string BomArchive::archive (const Inventory& iInventory) {
37  std::ostringstream oStr;
38  boost::archive::text_oarchive oa (oStr);
39  oa << iInventory;
40  return oStr.str();
41  }
42 
43  // ////////////////////////////////////////////////////////////////////
44  void BomArchive::restore (const std::string& iArchive,
45  Inventory& ioInventory) {
46  std::istringstream iStr;
47  boost::archive::text_iarchive ia (iStr);
48  ia >> ioInventory;
49  }
50 
51  // ////////////////////////////////////////////////////////////////////
52  void BomArchive::archive (const FlightDate& iFlightDate) {
53  }
54 
55 }
Handle on the StdAir library context.
static void restore(const std::string &iArchive, Inventory &)
Definition: BomArchive.cpp:44
Class representing the actual attributes for an airline inventory.
Definition: Inventory.hpp:34
Class representing the actual attributes for the Bom root.
Definition: BomRoot.hpp:32
Class representing the actual attributes for an airline flight-date.
Definition: FlightDate.hpp:35
static void archive(const BomRoot &)
Definition: BomArchive.cpp:32