SimFQT Logo  0.1.3
C++ Simulated Fare Quote System Library
SIMFQT_ServiceContext.hpp
Go to the documentation of this file.
00001 #ifndef __SIMFQT_SVC_SIMFQTSERVICECONTEXT_HPP
00002 #define __SIMFQT_SVC_SIMFQTSERVICECONTEXT_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 // STL
00008 #include <string>
00009 // StdAir
00010 #include <stdair/stdair_service_types.hpp>
00011 #include <stdair/service/ServiceAbstract.hpp>
00012 // SimFQT
00013 #include <simfqt/SIMFQT_Types.hpp>
00014 
00016 namespace stdair {
00017   class STDAIR_Service;
00018 }
00019 
00020 namespace SIMFQT {
00021 
00025   class SIMFQT_ServiceContext : public stdair::ServiceAbstract {
00031     friend class SIMFQT_Service;
00032     friend class FacSimfqtServiceContext;
00033 
00034   private:
00035     // ///////// Getters //////////
00039     stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
00040       return _stdairService;
00041     }
00042 
00046     stdair::STDAIR_Service& getSTDAIR_Service() const;
00047 
00051     const bool getOwnStdairServiceFlag() const {
00052       return _ownStdairService;
00053     }
00054 
00055 
00056   private:    
00057     // ///////// Setters //////////
00061     void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
00062                             const bool iOwnStdairService) {
00063       _stdairService = ioSTDAIR_ServicePtr;
00064       _ownStdairService = iOwnStdairService;
00065     }
00066 
00070     void reset();
00071 
00072 
00073   private:
00074     // ///////// Display Methods //////////
00078     const std::string shortDisplay() const;
00079     
00083     const std::string display() const;
00084 
00088     const std::string describe() const;
00089 
00090 
00091   private:
00092     // /////// Construction / initialisation ////////
00096     SIMFQT_ServiceContext (const FareQuoteID_T&);
00097 
00101     SIMFQT_ServiceContext();
00102 
00106     SIMFQT_ServiceContext (const SIMFQT_ServiceContext&);
00107         
00111     ~SIMFQT_ServiceContext();
00112 
00113 
00114   private:
00115     // ///////////// Children ////////////
00119     stdair::STDAIR_ServicePtr_T _stdairService;
00120 
00124     bool _ownStdairService;
00125   };
00126 
00127 }
00128 #endif // __SIMFQT_SVC_SIMFQTSERVICECONTEXT_HPP
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines