StdAir Logo  1.00.8
C++ Standard Airline IT Object Library
PosChannelKey.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 // STL
5 #include <ostream>
6 #include <sstream>
7 // STDAIR
11 
12 namespace stdair {
13 
14  // ////////////////////////////////////////////////////////////////////
15  PosChannelKey::PosChannelKey()
16  : _pos (DEFAULT_POS),
17  _channel (DEFAULT_CHANNEL) {
18  assert (false);
19  }
20 
21  // ////////////////////////////////////////////////////////////////////
22  PosChannelKey::PosChannelKey (const CityCode_T& iPos,
23  const ChannelLabel_T& iChannel)
24  : _pos (iPos), _channel(iChannel) {
25  }
26 
27  // ////////////////////////////////////////////////////////////////////
28  PosChannelKey::PosChannelKey (const PosChannelKey& iKey)
29  : _pos (iKey._pos), _channel (iKey._channel) {
30  }
31 
32  // ////////////////////////////////////////////////////////////////////
34  }
35 
36  // ////////////////////////////////////////////////////////////////////
37  void PosChannelKey::toStream (std::ostream& ioOut) const {
38  ioOut << "PosChannelKey: " << toString() << std::endl;
39  }
40 
41  // ////////////////////////////////////////////////////////////////////
42  void PosChannelKey::fromStream (std::istream& ioIn) {
43  }
44 
45  // ////////////////////////////////////////////////////////////////////
46  const std::string PosChannelKey::toString() const {
47  std::ostringstream oStr;
48  oStr << _pos << DEFAULT_KEY_SUB_FLD_DELIMITER
49  << " " << _channel;
50  return oStr.str();
51  }
52 
53 }
PosChannelKey.hpp
stdair::DEFAULT_KEY_SUB_FLD_DELIMITER
const std::string DEFAULT_KEY_SUB_FLD_DELIMITER
stdair::PosChannelKey::~PosChannelKey
~PosChannelKey()
Definition: PosChannelKey.cpp:33
BasConst_BomDisplay.hpp
stdair::PosChannelKey::fromStream
void fromStream(std::istream &ioIn)
Definition: PosChannelKey.cpp:42
stdair::PosChannelKey::toStream
void toStream(std::ostream &ioOut) const
Definition: PosChannelKey.cpp:37
stdair
Handle on the StdAir library context.
Definition: BasChronometer.cpp:9
BasConst_Request.hpp
stdair::DEFAULT_POS
const CityCode_T DEFAULT_POS
stdair::CityCode_T
LocationCode_T CityCode_T
Definition: stdair_basic_types.hpp:25
stdair::PosChannelKey
Key of point of sale and channel.
Definition: PosChannelKey.hpp:15
stdair::ChannelLabel_T
std::string ChannelLabel_T
Definition: stdair_demand_types.hpp:92
stdair::DEFAULT_CHANNEL
const ChannelLabel_T DEFAULT_CHANNEL
Definition: BasConst_Request.hpp:48
stdair::PosChannelKey::toString
const std::string toString() const
Definition: PosChannelKey.cpp:46