StdAir Logo  1.00.15
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
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
12namespace 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 // ////////////////////////////////////////////////////////////////////
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}
Handle on the StdAir library context.
const std::string DEFAULT_KEY_SUB_FLD_DELIMITER
std::string ChannelLabel_T
const ChannelLabel_T DEFAULT_CHANNEL
const CityCode_T DEFAULT_POS
LocationCode_T CityCode_T
Key of point of sale and channel.
void fromStream(std::istream &ioIn)
const std::string toString() const
void toStream(std::ostream &ioOut) const