TravelCCM Logo  1.00.1
C++ Travel Customer Choice Model Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
TRAVELCCM_ServiceContext.hpp
Go to the documentation of this file.
1 #ifndef __TRAVELCCM_SVC_TRAVELCCM_SERVICE_CONTEXT_HPP
2 #define __TRAVELCCM_SVC_TRAVELCCM_SERVICE_CONTEXT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // Boost
10 #include <boost/shared_ptr.hpp>
11 // StdAir
12 #include <stdair/stdair_service_types.hpp>
13 #include <stdair/service/ServiceAbstract.hpp>
14 // TravelCCM
16 
17 namespace TRAVELCCM {
18 
23  class TRAVELCCM_ServiceContext : public stdair::ServiceAbstract {
29  friend class TRAVELCCM_Service;
31 
32  private:
33  // ///////////////// Getters ///////////////////
37  stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
38  return _stdairService;
39  }
40 
44  stdair::STDAIR_Service& getSTDAIR_Service() const {
45  assert (_stdairService != NULL);
46  return *_stdairService;
47  }
48 
52  const bool getOwnStdairServiceFlag() const {
53  return _ownStdairService;
54  }
55 
56 
57  // ///////////////// Setters ///////////////////
61  void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
62  const bool iOwnStdairService) {
63  _stdairService = ioSTDAIR_ServicePtr;
64  _ownStdairService = iOwnStdairService;
65  }
66 
67 
68  private:
69  // //////////////////// Display Methods /////////////////////
73  const std::string shortDisplay() const;
74 
78  const std::string display() const;
79 
83  const std::string describe() const;
84 
85 
86  private:
88 
91  TRAVELCCM_ServiceContext();
95  TRAVELCCM_ServiceContext (const TRAVELCCM_ServiceContext&);
96 
100  ~TRAVELCCM_ServiceContext();
101 
105  void reset();
106 
107 
108  private:
109  // /////////////// Children ///////////////
113  stdair::STDAIR_ServicePtr_T _stdairService;
114 
118  bool _ownStdairService;
119  };
120 
121 }
122 #endif // __TRAVELCCM_SVC_TRAVELCCM_SERVICE_CONTEXT_HPP