1.00.15
C++ Simulated Airline Inventory Management System Library
Toggle main menu visibility
Loading...
Searching...
No Matches
AIRINV_Master_ServiceContext.cpp
Go to the documentation of this file.
1
// //////////////////////////////////////////////////////////////////////
2
// Import section
3
// //////////////////////////////////////////////////////////////////////
4
// STL
5
#include <cassert>
6
#include <sstream>
7
// Airinv
8
#include <
airinv/basic/BasConst_AIRINV_Service.hpp
>
9
#include <
airinv/service/AIRINV_Master_ServiceContext.hpp
>
10
11
namespace
AIRINV
{
12
13
// //////////////////////////////////////////////////////////////////////
14
AIRINV_Master_ServiceContext::AIRINV_Master_ServiceContext()
15
: _ownStdairService (false),
16
_ownSEVMGRService (true) {
17
}
18
19
// //////////////////////////////////////////////////////////////////////
20
AIRINV_Master_ServiceContext::~AIRINV_Master_ServiceContext() {
21
}
22
23
// //////////////////////////////////////////////////////////////////////
24
const
std::string AIRINV_Master_ServiceContext::shortDisplay()
const
{
25
std::ostringstream oStr;
26
oStr <<
"AIRINV_Master_ServiceContext -- Owns StdAir service: "
27
<< _ownStdairService;
28
return
oStr.str();
29
}
30
31
// //////////////////////////////////////////////////////////////////////
32
const
std::string AIRINV_Master_ServiceContext::display()
const
{
33
std::ostringstream oStr;
34
oStr << shortDisplay();
35
return
oStr.str();
36
}
37
38
// //////////////////////////////////////////////////////////////////////
39
const
std::string AIRINV_Master_ServiceContext::describe()
const
{
40
return
shortDisplay();
41
}
42
43
// //////////////////////////////////////////////////////////////////////
44
void
AIRINV_Master_ServiceContext::reset() {
45
46
// The shared_ptr<>::reset() method drops the refcount by one.
47
// If the count result is dropping to zero, the resource pointed to
48
// by the shared_ptr<> will be freed.
49
50
// Reset the stdair shared pointer
51
_stdairService.reset();
52
53
// Reset the sevmgr shared pointer
54
_sevmgrService.reset();
55
56
// Reset the airinv shared pointer
57
_airinvService.reset();
58
}
59
60
}
AIRINV_Master_ServiceContext.hpp
BasConst_AIRINV_Service.hpp
AIRINV
Definition
AIRINV_Master_Service.hpp:38
Generated on
for AirInv by
1.17.0