StdAir Logo  1.00.17
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
AirportPairKey.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 // ////////////////////////////////////////////////////////////////////
16 : _boardingPoint (DEFAULT_ORIGIN),
17 _offPoint (DEFAULT_DESTINATION) {
18 assert (false);
19 }
20
21 // ////////////////////////////////////////////////////////////////////
23 const AirportCode_T& iOffPoint)
24 : _boardingPoint (iBoardingPoint), _offPoint (iOffPoint) {
25 }
26
27 // ////////////////////////////////////////////////////////////////////
29 : _boardingPoint (iKey._boardingPoint),
30 _offPoint (iKey._offPoint) {
31 }
32
33 // ////////////////////////////////////////////////////////////////////
36
37 // ////////////////////////////////////////////////////////////////////
38 void AirportPairKey::toStream (std::ostream& ioOut) const {
39 ioOut << "AirportPairKey: " << toString() << std::endl;
40 }
41
42 // ////////////////////////////////////////////////////////////////////
43 void AirportPairKey::fromStream (std::istream& ioIn) {
44 }
45
46 // ////////////////////////////////////////////////////////////////////
47 const std::string AirportPairKey::toString() const {
48 std::ostringstream oStr;
49 oStr << _boardingPoint << DEFAULT_KEY_SUB_FLD_DELIMITER
50 << " " << _offPoint;
51 return oStr.str();
52 }
53
54}
Handle on the StdAir library context.
const std::string DEFAULT_KEY_SUB_FLD_DELIMITER
const AirportCode_T DEFAULT_DESTINATION
const AirportCode_T DEFAULT_ORIGIN
LocationCode_T AirportCode_T
const std::string toString() const
AirportPairKey(const stdair::AirportCode_T &, const stdair::AirportCode_T &)
void fromStream(std::istream &ioIn)
void toStream(std::ostream &ioOut) const