AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
10 
11 namespace AIRINV {
12 
13  // //////////////////////////////////////////////////////////////////////
14  AIRINV_Master_ServiceContext::AIRINV_Master_ServiceContext()
15  : _ownStdairService (false) {
16  }
17 
18  // //////////////////////////////////////////////////////////////////////
19  AIRINV_Master_ServiceContext::~AIRINV_Master_ServiceContext() {
20  }
21 
22  // //////////////////////////////////////////////////////////////////////
23  const std::string AIRINV_Master_ServiceContext::shortDisplay() const {
24  std::ostringstream oStr;
25  oStr << "AIRINV_Master_ServiceContext -- Owns StdAir service: "
26  << _ownStdairService;
27  return oStr.str();
28  }
29 
30  // //////////////////////////////////////////////////////////////////////
31  const std::string AIRINV_Master_ServiceContext::display() const {
32  std::ostringstream oStr;
33  oStr << shortDisplay();
34  return oStr.str();
35  }
36 
37  // //////////////////////////////////////////////////////////////////////
38  const std::string AIRINV_Master_ServiceContext::describe() const {
39  return shortDisplay();
40  }
41 
42  // //////////////////////////////////////////////////////////////////////
43  void AIRINV_Master_ServiceContext::reset() {
44  if (_ownStdairService == true) {
45  _stdairService.reset();
46  }
47  }
48 
49 }