AirTSP Logo  1.01.7
C++ Simulated Airline Travel Solution Provider (TSP) Library
OriginDestinationSet.hpp
Go to the documentation of this file.
1 #ifndef __AIRTSP_BOM_ORIGINDESTINATIONSET_HPP
2 #define __AIRTSP_BOM_ORIGINDESTINATIONSET_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 // StdAir
11 #include <stdair/bom/BomAbstract.hpp>
12 // AirTSP
15 
17 namespace boost {
18  namespace serialization {
19  class access;
20  }
21 }
22 
24 namespace stdair {
25  template <typename BOM> class FacBom;
26  class FacBomManager;
27 }
28 
29 namespace AIRTSP {
30 
44  class OriginDestinationSet : public stdair::BomAbstract {
48  template <typename BOM> friend class stdair::FacBom;
49  friend class stdair::FacBomManager;
51 
52  public:
53  // ////////// Type definitions ////////////
58 
59 
60  public:
61  // /////////// Getters /////////////
65  const Key_T& getKey() const {
66  return _key;
67  }
68 
72  const stdair::AirportCode_T& getDestination() const {
73  return _key.getOffPoint();
74  }
75 
79  stdair::BomAbstract* const getParent() const {
80  return _parent;
81  }
82 
86  const stdair::HolderMap_T& getHolderMap() const {
87  return _holderMap;
88  }
89 
90 
91  public:
92  // /////////// Display support methods /////////
98  void toStream (std::ostream& ioOut) const {
99  ioOut << toString();
100  }
101 
107  void fromStream (std::istream& ioIn) {
108  }
109 
113  std::string toString() const;
114 
118  const std::string describeKey() const {
119  return _key.toString();
120  }
121 
122 
123  public:
124  // /////////// (Boost) Serialisation support methods /////////
128  template<class Archive>
129  void serialize (Archive& ar, const unsigned int iFileVersion);
130 
131  private:
136  void serialisationImplementationExport() const;
137  void serialisationImplementationImport();
138 
139 
140  protected:
141  // ////////// Constructors and destructors /////////
145  OriginDestinationSet (const Key_T&);
146 
151 
152  private:
157 
162 
163  protected:
164  // ////////// Attributes /////////
169 
173  stdair::BomAbstract* _parent;
174 
178  stdair::HolderMap_T _holderMap;
179  };
180 
181 }
182 #endif // __AIRTSP_BOM_ORIGINDESTINATIONSET_HPP
183 
AIRTSP::OriginDestinationSet::_parent
stdair::BomAbstract * _parent
Definition: OriginDestinationSet.hpp:173
AIRTSP::OriginDestinationSet::getHolderMap
const stdair::HolderMap_T & getHolderMap() const
Definition: OriginDestinationSet.hpp:86
AIRTSP::OriginDestinationSet::describeKey
const std::string describeKey() const
Definition: OriginDestinationSet.hpp:118
AIRTSP::OriginDestinationSet::toString
std::string toString() const
Definition: OriginDestinationSet.cpp:40
AIRTSP::OriginDestinationSet::Key_T
OriginDestinationSetKey Key_T
Definition: OriginDestinationSet.hpp:57
AIRTSP::OriginDestinationSet
Class representing a simple sub-network.
Definition: OriginDestinationSet.hpp:44
AIRTSP::OriginDestinationSetKey
Structure representing the key of a sub-network.
Definition: OriginDestinationSetKey.hpp:30
boost
Forward declarations.
Definition: OriginDestinationSet.hpp:17
AIRTSP::OriginDestinationSet::getDestination
const stdair::AirportCode_T & getDestination() const
Definition: OriginDestinationSet.hpp:72
stdair
Forward declarations.
Definition: AIRTSP_Service.hpp:14
AIRTSP::OriginDestinationSet::serialize
void serialize(Archive &ar, const unsigned int iFileVersion)
Definition: OriginDestinationSet.cpp:62
AIRTSP::OriginDestinationSetKey::toString
const std::string toString() const
Definition: OriginDestinationSetKey.cpp:50
AIRTSP::OriginDestinationSet::FacBomManager
friend class stdair::FacBomManager
Definition: OriginDestinationSet.hpp:49
OriginDestinationSetTypes.hpp
AIRTSP
Definition: AIRTSP_Service.hpp:23
AIRTSP::OriginDestinationSetKey::getOffPoint
const stdair::AirportCode_T & getOffPoint() const
Definition: OriginDestinationSetKey.hpp:62
AIRTSP::OriginDestinationSet::getParent
stdair::BomAbstract *const getParent() const
Definition: OriginDestinationSet.hpp:79
AIRTSP::OriginDestinationSet::access
friend class boost::serialization::access
Definition: OriginDestinationSet.hpp:50
AIRTSP::OriginDestinationSet::fromStream
void fromStream(std::istream &ioIn)
Definition: OriginDestinationSet.hpp:107
OriginDestinationSetKey.hpp
AIRTSP::OriginDestinationSet::getKey
const Key_T & getKey() const
Definition: OriginDestinationSet.hpp:65
AIRTSP::OriginDestinationSet::~OriginDestinationSet
~OriginDestinationSet()
Definition: OriginDestinationSet.cpp:36
AIRTSP::OriginDestinationSet::toStream
void toStream(std::ostream &ioOut) const
Definition: OriginDestinationSet.hpp:98
AIRTSP::OriginDestinationSet::_holderMap
stdair::HolderMap_T _holderMap
Definition: OriginDestinationSet.hpp:178
AIRTSP::OriginDestinationSet::_key
Key_T _key
Definition: OriginDestinationSet.hpp:168
stdair::FacBom
Definition: OriginDestinationSet.hpp:25