StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
LegCabinKey.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_LEGCABINKEY_HPP
2 #define __STDAIR_BOM_LEGCABINKEY_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 LegCabinKey : public KeyAbstract {
28 
29  // /////////// Constructors and destructors ///////////
30  private:
34  LegCabinKey();
35 
36  public:
40  LegCabinKey (const CabinCode_T& iCabinCode);
41 
45  LegCabinKey (const LegCabinKey&);
46 
50  ~LegCabinKey();
51 
52 
53  public:
54  // /////////// Getters //////////
56  const CabinCode_T& getCabinCode() const {
57  return _cabinCode;
58  }
59 
60 
61  public:
62  // /////////// Display support methods /////////
68  void toStream (std::ostream& ioOut) const;
69 
75  void fromStream (std::istream& ioIn);
76 
86  const std::string toString() const;
87 
88 
89  public:
90  // /////////// (Boost) Serialisation support methods /////////
94  template<class Archive>
95  void serialize (Archive& ar, const unsigned int iFileVersion);
96 
97  private:
102  void serialisationImplementationExport() const;
103  void serialisationImplementationImport();
104 
105 
106  private:
107  // ///////////////// Attributes ///////////////
111  CabinCode_T _cabinCode;
112  };
113 
114 }
115 #endif // __STDAIR_BOM_LEGCABINKEY_HPP
std::string CabinCode_T
const std::string toString() const
Definition: LegCabinKey.cpp:46
Handle on the StdAir library context.
Base class for the keys of Business Object Model (BOM) layer.
Definition: KeyAbstract.hpp:27
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition: LegCabinKey.cpp:68
void fromStream(std::istream &ioIn)
Definition: LegCabinKey.cpp:42
Forward declarations.
void toStream(std::ostream &ioOut) const
Definition: LegCabinKey.cpp:37
Key of a given leg-cabin, made of a cabin code (only).
Definition: LegCabinKey.hpp:26
const CabinCode_T & getCabinCode() const
Definition: LegCabinKey.hpp:56
friend class boost::serialization::access
Definition: LegCabinKey.hpp:27