$treeview $search $mathjax
00001 // ////////////////////////////////////////////////////////////////////// 00002 // Import section 00003 // ////////////////////////////////////////////////////////////////////// 00004 // STL 00005 #include <ostream> 00006 #include <sstream> 00007 // STDAIR 00008 #include <stdair/basic/BasConst_General.hpp> 00009 #include <stdair/bom/TimePeriodKey.hpp> 00010 00011 namespace stdair { 00012 00013 // //////////////////////////////////////////////////////////////////// 00014 TimePeriodKey::TimePeriodKey () 00015 : _timeRangeStart (DEFAULT_EPSILON_DURATION), 00016 _timeRangeEnd (DEFAULT_EPSILON_DURATION) { 00017 assert (false); 00018 } 00019 00020 // //////////////////////////////////////////////////////////////////// 00021 TimePeriodKey::TimePeriodKey (const Time_T& iTimeRangeStart, 00022 const Time_T& iTimeRangeEnd) 00023 : _timeRangeStart(iTimeRangeStart), 00024 _timeRangeEnd(iTimeRangeEnd) { 00025 } 00026 00027 // //////////////////////////////////////////////////////////////////// 00028 TimePeriodKey::TimePeriodKey (const TimePeriodKey& iKey) 00029 : _timeRangeStart(iKey.getTimeRangeStart()), 00030 _timeRangeEnd(iKey.getTimeRangeEnd()) { 00031 } 00032 00033 // //////////////////////////////////////////////////////////////////// 00034 TimePeriodKey::~TimePeriodKey () { 00035 } 00036 00037 // //////////////////////////////////////////////////////////////////// 00038 void TimePeriodKey::toStream (std::ostream& ioOut) const { 00039 ioOut << "TimePeriodKey: " << toString() << std::endl; 00040 } 00041 00042 // //////////////////////////////////////////////////////////////////// 00043 void TimePeriodKey::fromStream (std::istream& ioIn) { 00044 } 00045 00046 // //////////////////////////////////////////////////////////////////// 00047 const std::string TimePeriodKey::toString() const { 00048 std::ostringstream oStr; 00049 oStr << _timeRangeStart << "-" << _timeRangeEnd; 00050 return oStr.str(); 00051 } 00052 00053 }