StdAir Logo  1.00.18
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
TimePeriodKey.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// STL
5#include <ostream>
6#include <sstream>
7// STDAIR
10
11namespace stdair {
12
13 // ////////////////////////////////////////////////////////////////////
15 : _timeRangeStart (DEFAULT_EPSILON_DURATION),
16 _timeRangeEnd (DEFAULT_EPSILON_DURATION) {
17 assert (false);
18 }
19
20 // ////////////////////////////////////////////////////////////////////
21 TimePeriodKey::TimePeriodKey (const Time_T& iTimeRangeStart,
22 const Time_T& iTimeRangeEnd)
23 : _timeRangeStart(iTimeRangeStart),
24 _timeRangeEnd(iTimeRangeEnd) {
25 }
26
27 // ////////////////////////////////////////////////////////////////////
29 : _timeRangeStart(iKey.getTimeRangeStart()),
30 _timeRangeEnd(iKey.getTimeRangeEnd()) {
31 }
32
33 // ////////////////////////////////////////////////////////////////////
36
37 // ////////////////////////////////////////////////////////////////////
38 void TimePeriodKey::toStream (std::ostream& ioOut) const {
39 ioOut << "TimePeriodKey: " << toString() << std::endl;
40 }
41
42 // ////////////////////////////////////////////////////////////////////
43 void TimePeriodKey::fromStream (std::istream& ioIn) {
44 }
45
46 // ////////////////////////////////////////////////////////////////////
47 const std::string TimePeriodKey::toString() const {
48 std::ostringstream oStr;
49 oStr << _timeRangeStart << "-" << _timeRangeEnd;
50 return oStr.str();
51 }
52
53}
Handle on the StdAir library context.
boost::posix_time::time_duration Time_T
const Duration_T DEFAULT_EPSILON_DURATION
const std::string toString() const
void toStream(std::ostream &ioOut) const
void fromStream(std::istream &ioIn)
TimePeriodKey(const Time_T &, const Time_T &)
const Time_T & getTimeRangeStart() const
const Time_T & getTimeRangeEnd() const