00001
00019 #ifndef ExecutionContext_h
00020 #define ExecutionContext_h
00021
00022 #include <rtm/idl/RTCSkel.h>
00023
00024 namespace RTC
00025 {
00129 class ExecutionContextBase
00130 : public virtual POA_RTC::ExecutionContextService,
00131 public virtual PortableServer::RefCountServantBase
00132 {
00133 public:
00141 ExecutionContextBase() {};
00142 ExecutionContextBase(RTObject_ptr owner);
00143
00144
00152 virtual ~ExecutionContextBase() {};
00153
00154
00155
00156
00185 virtual CORBA::Boolean is_running();
00186
00187
00223 virtual ReturnCode_t start();
00224
00225
00260 virtual ReturnCode_t stop();
00261
00262
00305 virtual CORBA::Double get_rate();
00306
00307
00360 virtual ReturnCode_t set_rate(CORBA::Double rate);
00361
00362
00408 virtual ReturnCode_t activate_component(LightweightRTObject_ptr comp);
00409
00410
00448 virtual ReturnCode_t deactivate_component(LightweightRTObject_ptr comp);
00449
00487 virtual ReturnCode_t reset_component(LightweightRTObject_ptr comp);
00488
00489
00524 virtual LifeCycleState get_component_state(LightweightRTObject_ptr comp);
00525
00526
00585 virtual ExecutionKind get_kind();
00586
00587
00633 virtual ReturnCode_t add(LightweightRTObject_ptr comp);
00634
00671 virtual ReturnCode_t remove(LightweightRTObject_ptr comp);
00672
00673
00674
00675
00676
00694 virtual ExecutionContextProfile* get_profile();
00695
00696
00697 protected:
00698 ExecutionContextProfile m_profile;
00699 CORBA::Boolean m_running;
00700
00701 template <class ObjRef>
00702 struct find_objref
00703 {
00704 find_objref(ObjRef ref) : m_ref(ref) {};
00705 bool operator()(ObjRef ref)
00706 {
00707 return ref->_is_equivalent(m_ref);
00708 }
00709 ObjRef m_ref;
00710 };
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722 };
00723
00724 };
00725
00726 #endif // ExecutionContext_h