StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
InventoryKey.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_INVENTORYKEY_HPP
2 #define __STDAIR_BOM_INVENTORYKEY_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
13 
15 namespace boost {
16  namespace serialization {
17  class access;
18  }
19 }
20 
21 namespace stdair {
22 
26  struct InventoryKey : public KeyAbstract {
28 
29  // /////////// Constructors and destructors ///////////
30  private:
34  InventoryKey();
35 
36  public:
37  // /////////// Construction ///////////
41  InventoryKey (const AirlineCode_T& iAirlineCode);
42 
46  InventoryKey (const InventoryKey&);
47 
51  ~InventoryKey();
52 
53 
54  // /////////// Getters //////////
58  const AirlineCode_T& getAirlineCode() const {
59  return _airlineCode;
60  }
61 
62 
63  public:
64  // /////////// Display support methods /////////
70  void toStream (std::ostream& ioOut) const;
71 
77  void fromStream (std::istream& ioIn);
78 
88  const std::string toString() const;
89 
90 
91  public:
92  // /////////// (Boost) Serialisation support methods /////////
96  template<class Archive>
97  void serialize (Archive& ar, const unsigned int iFileVersion);
98 
99  private:
104  void serialisationImplementationExport() const;
105  void serialisationImplementationImport();
106 
107 
108  private:
109  // ///////////////// Attributes ///////////////
113  AirlineCode_T _airlineCode;
114  };
115 
116 }
117 #endif // __STDAIR_BOM_INVENTORYKEY_HPP
void toStream(std::ostream &ioOut) const
Handle on the StdAir library context.
std::string AirlineCode_T
Base class for the keys of Business Object Model (BOM) layer.
Definition: KeyAbstract.hpp:27
Key of a given inventory, made of the airline code.
void fromStream(std::istream &ioIn)
friend class boost::serialization::access
Forward declarations.
const AirlineCode_T & getAirlineCode() const
void serialize(Archive &ar, const unsigned int iFileVersion)
const std::string toString() const