8 #include <boost/tokenizer.hpp>
9 #include <boost/lexical_cast.hpp>
10 #include <boost/date_time/gregorian/parsers.hpp>
28 typedef boost::tokenizer<boost::char_separator<char> >
Tokeniser_T;
42 _departureDate (
""), _boardingPoint (
""),
43 _offPoint (
""), _boardingTime (
"") {
66 if (lDateTokens.begin() == lDateTokens.end()) {
75 const Date_T lDepartureDate =
78 const FlightDateKey oFlightDateKey (lFlightNumber, lDepartureDate);
80 return oFlightDateKey;
108 return oSegmentDateKey;
116 if (lTimeTokens.begin() == lTimeTokens.end()) {
123 const Duration_T oBoardingTime (boost::posix_time::
126 return oBoardingTime;
131 ioOut <<
"ParsedKey: " <<
toString();
140 std::ostringstream oStr;
const std::string DEFAULT_KEY_SUB_FLD_DELIMITER
const boost::char_separator< char > TokeniserDashSeparator("-")
std::string _flightNumber
#define STDAIR_LOG_ERROR(iToBeLogged)
const boost::char_separator< char > TokeniserTimeSeparator(":")
unsigned short FlightNumber_T
Handle on the StdAir library context.
boost::posix_time::time_duration Duration_T
std::string _departureDate
SegmentDateKey getSegmentKey() const
const std::string DEFAULT_KEY_FLD_DELIMITER
const std::string toString() const
LegDateKey getLegKey() const
Key of a given inventory, made of the airline code.
FlightDateKey getFlightDateKey() const
std::string _boardingTime
InventoryKey getInventoryKey() const
Key of a given flight-date, made of a flight number and a departure date.
std::string _boardingPoint
boost::gregorian::date Date_T
void toStream(std::ostream &ioOut) const
Key of a given segment-date, made of an origin and a destination airports.
void fromStream(std::istream &ioIn)
boost::tokenizer< boost::char_separator< char > > Tokeniser_T
const Duration_T getBoardingTime() const
#define STDAIR_LOG_DEBUG(iToBeLogged)