SEvMgr Logo  0.2.0
C++ Simulation-Oriented Discrete Event Management Library
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
SEVMGR_ServiceContext.hpp
Go to the documentation of this file.
1 #ifndef __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP
2 #define __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <string>
9 // StdAir
10 #include <stdair/stdair_basic_types.hpp>
11 #include <stdair/stdair_service_types.hpp>
12 #include <stdair/service/ServiceAbstract.hpp>
13 // SEvMgr
14 #include <sevmgr/SEVMGR_Types.hpp>
15 
16 namespace SEVMGR {
17 
21  class SEVMGR_ServiceContext : public stdair::ServiceAbstract {
27  friend class SEVMGR_Service;
29 
30  private:
31  // ///////// Getters //////////
35  stdair::STDAIR_ServicePtr_T getSTDAIR_ServicePtr() const {
36  return _stdairService;
37  }
38 
42  stdair::STDAIR_Service& getSTDAIR_Service() const {
43  assert (_stdairService != NULL);
44  return *_stdairService;
45  }
46 
50  const bool getOwnStdairServiceFlag() const {
51  return _ownStdairService;
52  }
53 
54 
55  private:
56  // ///////// Setters //////////
60  void setSTDAIR_Service (stdair::STDAIR_ServicePtr_T ioSTDAIR_ServicePtr,
61  const bool iOwnStdairService) {
62  _stdairService = ioSTDAIR_ServicePtr;
63  _ownStdairService = iOwnStdairService;
64  }
65 
66 
67  private:
68  // ///////// Display Methods //////////
72  const std::string shortDisplay() const;
73 
77  const std::string display() const;
78 
82  const std::string describe() const;
83 
84 
85  private:
87 
90  SEVMGR_ServiceContext();
91  SEVMGR_ServiceContext (const std::string& iServiceName);
95  SEVMGR_ServiceContext (const SEVMGR_ServiceContext&);
96 
100  ~SEVMGR_ServiceContext();
101 
105  void reset();
106 
107 
108  private:
109  // /////////////// Children ///////////////
113  stdair::STDAIR_ServicePtr_T _stdairService;
114 
118  bool _ownStdairService;
119 
120 
121  private:
122  // ////////////// Attributes ////////////////
123  // No attributes for now
124  };
125 
126 }
127 #endif // __SEVMGR_SVC_SEVMGRSERVICECONTEXT_HPP