1.00.26
C++ Standard Airline IT Object Library
Toggle main menu visibility
Loading...
Searching...
No Matches
TimePeriod.hpp
Go to the documentation of this file.
1
#ifndef __STDAIR_BOM_FARETIMEPERIOD_HPP
2
#define __STDAIR_BOM_FARETIMEPERIOD_HPP
3
4
// //////////////////////////////////////////////////////////////////////
5
// Import section
6
// //////////////////////////////////////////////////////////////////////
7
// STDAIR
8
#include <
stdair/bom/BomAbstract.hpp
>
9
#include <
stdair/bom/TimePeriodKey.hpp
>
10
#include <
stdair/bom/TimePeriodTypes.hpp
>
11
12
// Forward declaration
13
namespace
stdair
{
14
18
class
TimePeriod
:
public
BomAbstract
{
19
template
<
typename
BOM>
friend
class
FacBom
;
20
template
<
typename
BOM>
friend
class
FacCloneBom
;
21
friend
class
FacBomManager
;
22
23
public
:
24
// //////////// Type definitions //////////////
28
typedef
TimePeriodKey
Key_T
;
29
30
public
:
31
// /////////// Display support methods /////////
32
// /////////// Display support methods /////////
38
void
toStream
(std::ostream& ioOut)
const
{
39
ioOut <<
toString
();
40
}
41
47
void
fromStream
(std::istream& ioIn) {
48
}
49
53
std::string
toString
()
const
;
54
58
const
std::string
describeKey
()
const
{
59
return
_key
.toString();
60
}
61
62
public
:
63
// ////////// Getters ////////////
67
const
Key_T
&
getKey
()
const
{
68
return
_key
;
69
}
70
74
BomAbstract
*
const
getParent
()
const
{
75
return
_parent
;
76
}
77
81
const
HolderMap_T
&
getHolderMap
()
const
{
82
return
_holderMap
;
83
}
84
88
const
Time_T
&
getTimeRangeStart
()
const
{
89
return
_key
.getTimeRangeStart();
90
}
91
95
const
Time_T
&
getTimeRangeEnd
()
const
{
96
return
_key
.getTimeRangeEnd();
97
}
98
99
public
:
100
// ////////////// Business methods ///////////////
105
bool
isDepartureTimeValid
(
const
Time_T
&)
const
;
106
107
protected
:
108
// ////////// Constructors and destructors /////////
112
TimePeriod
(
const
Key_T
&);
116
virtual
~TimePeriod
();
117
118
private
:
122
TimePeriod
();
126
TimePeriod
(
const
TimePeriod
&);
127
128
protected
:
129
// ///////////// Attributes /////////////
133
Key_T
_key
;
134
138
BomAbstract
*
_parent
;
139
143
HolderMap_T
_holderMap
;
144
145
};
146
147
}
148
#endif
// __STDAIR_BOM_FARETIMEPERIOD_HPP
149
BomAbstract.hpp
TimePeriodKey.hpp
TimePeriodTypes.hpp
stdair
Handle on the StdAir library context.
Definition
BasChronometer.cpp:9
stdair::Time_T
boost::posix_time::time_duration Time_T
Definition
stdair_date_time_types.hpp:23
stdair::HolderMap_T
std::map< const std::type_info *, BomAbstract * > HolderMap_T
Definition
BomAbstract.hpp:63
stdair::BomAbstract::BomAbstract
BomAbstract()
Definition
BomAbstract.hpp:53
stdair::TimePeriod
Class representing the actual attributes for a fare time-period.
Definition
TimePeriod.hpp:18
stdair::TimePeriod::_parent
BomAbstract * _parent
Definition
TimePeriod.hpp:138
stdair::TimePeriod::~TimePeriod
virtual ~TimePeriod()
Definition
TimePeriod.cpp:32
stdair::TimePeriod::Key_T
TimePeriodKey Key_T
Definition
TimePeriod.hpp:28
stdair::TimePeriod::toStream
void toStream(std::ostream &ioOut) const
Definition
TimePeriod.hpp:38
stdair::TimePeriod::getTimeRangeStart
const Time_T & getTimeRangeStart() const
Definition
TimePeriod.hpp:88
stdair::TimePeriod::isDepartureTimeValid
bool isDepartureTimeValid(const Time_T &) const
Definition
TimePeriod.cpp:44
stdair::TimePeriod::getKey
const Key_T & getKey() const
Definition
TimePeriod.hpp:67
stdair::TimePeriod::describeKey
const std::string describeKey() const
Definition
TimePeriod.hpp:58
stdair::TimePeriod::getTimeRangeEnd
const Time_T & getTimeRangeEnd() const
Definition
TimePeriod.hpp:95
stdair::TimePeriod::_key
Key_T _key
Definition
TimePeriod.hpp:133
stdair::TimePeriod::getParent
BomAbstract *const getParent() const
Definition
TimePeriod.hpp:74
stdair::TimePeriod::TimePeriod
TimePeriod(const Key_T &)
Definition
TimePeriod.cpp:27
stdair::TimePeriod::toString
std::string toString() const
Definition
TimePeriod.cpp:36
stdair::TimePeriod::FacBom
friend class FacBom
Definition
TimePeriod.hpp:19
stdair::TimePeriod::getHolderMap
const HolderMap_T & getHolderMap() const
Definition
TimePeriod.hpp:81
stdair::TimePeriod::FacCloneBom
friend class FacCloneBom
Definition
TimePeriod.hpp:20
stdair::TimePeriod::FacBomManager
friend class FacBomManager
Definition
TimePeriod.hpp:21
stdair::TimePeriod::fromStream
void fromStream(std::istream &ioIn)
Definition
TimePeriod.hpp:47
stdair::TimePeriod::_holderMap
HolderMap_T _holderMap
Definition
TimePeriod.hpp:143
stdair::TimePeriodKey
Key of time-period.
Definition
TimePeriodKey.hpp:15
Generated for StdAir by
1.17.0