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