Go to the documentation of this file.00001 #ifndef __TRAVELCCM_SVC_TRAVELCCM_SERVICE_CONTEXT_HPP
00002 #define __TRAVELCCM_SVC_TRAVELCCM_SERVICE_CONTEXT_HPP
00003
00004
00005
00006
00007
00008 #include <string>
00009
00010 #include <boost/shared_ptr.hpp>
00011
00012 #include <stdair/stdair_service_types.hpp>
00013 #include <stdair/service/ServiceAbstract.hpp>
00014
00015 #include <travelccm/TRAVELCCM_Types.hpp>
00016
00017 namespace TRAVELCCM {
00018
00023 class TRAVELCCM_ServiceContext : public stdair::ServiceAbstract {
00029 friend class TRAVELCCM_Service;
00030 friend class FacTRAVELCCMServiceContext;
00031
00032 private:
00033
00037 stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
00038 return _stdairService;
00039 }
00040
00044 stdair::STDAIR_Service& getSTDAIR_Service() const {
00045 assert (_stdairService != NULL);
00046 return *_stdairService;
00047 }
00048
00052 const bool getOwnStdairServiceFlag() const {
00053 return _ownStdairService;
00054 }
00055
00056
00057
00061 void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00062 const bool iOwnStdairService) {
00063 _stdairService = ioSTDAIR_ServicePtr;
00064 _ownStdairService = iOwnStdairService;
00065 }
00066
00067
00068 private:
00069
00073 const std::string shortDisplay() const;
00074
00078 const std::string display() const;
00079
00083 const std::string describe() const;
00084
00085
00086 private:
00088
00091 TRAVELCCM_ServiceContext();
00095 TRAVELCCM_ServiceContext (const TRAVELCCM_ServiceContext&);
00096
00100 ~TRAVELCCM_ServiceContext();
00101
00105 void reset();
00106
00107
00108 private:
00109
00113 stdair::STDAIR_ServicePtr_T _stdairService;
00114
00118 bool _ownStdairService;
00119 };
00120
00121 }
00122 #endif // __TRAVELCCM_SVC_TRAVELCCM_SERVICE_CONTEXT_HPP