0.45.1
C++ Standard Airline IT Object Library
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Inventory.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
#include <sstream>
7
// StdAir
8
#include <
stdair/basic/BasConst_Inventory.hpp
>
9
#include <
stdair/bom/BomManager.hpp
>
10
#include <
stdair/bom/Inventory.hpp
>
11
#include <
stdair/bom/FlightDate.hpp
>
12
13
namespace
stdair {
14
15
// ////////////////////////////////////////////////////////////////////
16
Inventory::Inventory() : _key (
DEFAULT_AIRLINE_CODE
), _parent (NULL) {
17
// That constructor is used by the serialisation process
18
}
19
20
// ////////////////////////////////////////////////////////////////////
21
Inventory::Inventory (
const
Inventory&)
22
: _key (
DEFAULT_AIRLINE_CODE
), _parent (NULL) {
23
assert (
false
);
24
}
25
26
// ////////////////////////////////////////////////////////////////////
27
Inventory::Inventory (
const
Key_T
& iKey) : _key (iKey), _parent (NULL) {
28
}
29
30
// ////////////////////////////////////////////////////////////////////
31
Inventory::~Inventory
() {
32
}
33
34
// ////////////////////////////////////////////////////////////////////
35
std::string
Inventory::toString
()
const
{
36
std::ostringstream oStr;
37
oStr <<
describeKey
();
38
return
oStr.str();
39
}
40
41
// ////////////////////////////////////////////////////////////////////
42
FlightDate
*
Inventory::
43
getFlightDate
(
const
std::string& iFlightDateKeyStr)
const
{
44
FlightDate
* oFlightDate_ptr =
45
BomManager::getObjectPtr<FlightDate> (*
this
, iFlightDateKeyStr);
46
return
oFlightDate_ptr;
47
}
48
49
// ////////////////////////////////////////////////////////////////////
50
FlightDate
*
Inventory::
51
getFlightDate
(
const
FlightDateKey
& iFlightDateKey)
const
{
52
return
getFlightDate
(iFlightDateKey.
toString
());
53
}
54
55
}
56
Generated on Mon Aug 27 2012 21:34:04 for StdAir by
1.8.1.2