StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
InventoryKey.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_BOM_INVENTORYKEY_HPP
00002 #define __STDAIR_BOM_INVENTORYKEY_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <iosfwd>
00009 #include <string>
00010 // StdAir
00011 #include <stdair/stdair_inventory_types.hpp>
00012 #include <stdair/bom/KeyAbstract.hpp>
00013 
00015 namespace boost {
00016   namespace serialization {
00017     class access;
00018   }
00019 }
00020 
00021 namespace stdair {
00022   
00026   struct InventoryKey : public KeyAbstract {
00027     friend class boost::serialization::access;
00028     
00029     // /////////// Constructors and destructors ///////////
00030   private:
00034     InventoryKey();
00035     
00036   public:
00037     // /////////// Construction ///////////
00041     InventoryKey (const AirlineCode_T& iAirlineCode);
00042 
00046     InventoryKey (const InventoryKey&);
00047 
00051     ~InventoryKey();
00052     
00053 
00054     // /////////// Getters //////////
00058     const AirlineCode_T& getAirlineCode() const {
00059       return _airlineCode;
00060     }
00061 
00062 
00063   public:
00064     // /////////// Display support methods /////////
00070     void toStream (std::ostream& ioOut) const;
00071     
00077     void fromStream (std::istream& ioIn);
00078       
00088     const std::string toString() const;
00089 
00090 
00091   public:
00092     // /////////// (Boost) Serialisation support methods /////////
00096     template<class Archive>
00097     void serialize (Archive& ar, const unsigned int iFileVersion);
00098 
00099   private:
00104     void serialisationImplementationExport() const;
00105     void serialisationImplementationImport();
00106 
00107 
00108   private:
00109     // ///////////////// Attributes ///////////////
00113     AirlineCode_T _airlineCode;
00114   };
00115 
00116 }
00117 #endif // __STDAIR_BOM_INVENTORYKEY_HPP