AirInv Logo  0.1.2
C++ Simulated Airline Inventory Management System library
AIRINV_Master_ServiceContext.cpp
Go to the documentation of this file.
00001 // //////////////////////////////////////////////////////////////////////
00002 // Import section
00003 // //////////////////////////////////////////////////////////////////////
00004 // STL
00005 #include <cassert>
00006 #include <sstream>
00007 // Airinv
00008 #include <airinv/basic/BasConst_AIRINV_Service.hpp>
00009 #include <airinv/service/AIRINV_Master_ServiceContext.hpp>
00010 
00011 namespace AIRINV {
00012 
00013   // //////////////////////////////////////////////////////////////////////
00014   AIRINV_Master_ServiceContext::AIRINV_Master_ServiceContext()
00015    : _ownStdairService (false) {
00016   }
00017 
00018   // //////////////////////////////////////////////////////////////////////
00019   AIRINV_Master_ServiceContext::~AIRINV_Master_ServiceContext() {
00020   }
00021   
00022   // //////////////////////////////////////////////////////////////////////
00023   const std::string AIRINV_Master_ServiceContext::shortDisplay() const {
00024     std::ostringstream oStr;
00025     oStr << "AIRINV_Master_ServiceContext -- Owns StdAir service: "
00026          << _ownStdairService;
00027     return oStr.str();
00028   }
00029 
00030   // //////////////////////////////////////////////////////////////////////
00031   const std::string AIRINV_Master_ServiceContext::display() const {
00032     std::ostringstream oStr;
00033     oStr << shortDisplay();
00034     return oStr.str();
00035   }
00036 
00037   // //////////////////////////////////////////////////////////////////////
00038   const std::string AIRINV_Master_ServiceContext::describe() const {
00039     return shortDisplay();
00040   }
00041 
00042   // //////////////////////////////////////////////////////////////////////
00043   void AIRINV_Master_ServiceContext::reset() {
00044     if (_ownStdairService == true) {
00045       _stdairService.reset();
00046     }
00047   }
00048 
00049 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines