StdAir Logo  1.00.0
C++ Standard Airline IT Object Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AirlineStruct.hpp
Go to the documentation of this file.
1 #ifndef __STDAIR_BOM_AIRLINESTRUCT_HPP
2 #define __STDAIR_BOM_AIRLINESTRUCT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <iosfwd>
9 #include <string>
10 #include <vector>
11 // StdAir
14 
15 namespace stdair {
16 
18  struct AirlineStruct : public StructAbstract {
19  public:
20  // /////////// Getters ///////////////
22  const AirlineCode_T& getAirlineCode() const {
23  return _code;
24  }
25 
27  const std::string& getAirlineName() const {
28  return _name;
29  }
30 
31  // /////////// Setters ///////////////
33  void setAirlineCode (const AirlineCode_T& iAirlineCode) {
34  _code = iAirlineCode;
35  }
36 
38  void setAirlineName (const std::string& iAirlineName) {
39  _name = iAirlineName;
40  }
41 
42 
43  public:
44  // /////////// Display support method /////////////
47  void toStream (std::ostream& ioOut) const;
48 
51  void fromStream (std::istream& ioIn);
52 
54  const std::string describe() const;
55 
56 
57  public:
58  // //////////// Constructors & Destructor ///////////////
60  AirlineStruct (const AirlineCode_T&, const std::string& iAirlineName);
62  AirlineStruct ();
66  ~AirlineStruct ();
67 
68 
69  private:
70  // ///////////////////// Attributes //////////////////////
72  AirlineCode_T _code;
73 
75  std::string _name;
76  };
77 
78 }
79 #endif // __STDAIR_BOM_AIRLINESTRUCT_HPP