ExecutionContextAdapter.cpp
Go to the documentation of this file.
00001 // -*- C++ -*-
00019 #include <doil/corba/util.h>
00020 #include <rtc/corba/ExecutionContextAdapter.h>
00021 #include <rtc/corba/util.h>
00022 
00023 namespace RTC
00024 {
00025 namespace CORBA
00026 {
00027   using namespace doil::CORBA;
00028   ExecutionContextAdapter::ExecutionContextAdapter(RTC::ExecutionContext_ptr obj)
00029     : m_obj(obj)
00030   {
00031   }
00032 
00033   ExecutionContextAdapter::~ExecutionContextAdapter()
00034   {
00035   }
00036   
00037   bool ExecutionContextAdapter::is_running() const
00038   {
00039     return m_obj->is_running();
00040   }
00041   
00042   ReturnCode_t ExecutionContextAdapter::start()
00043   {
00044     return to_local(m_obj->start());
00045   }
00046   
00047   ReturnCode_t ExecutionContextAdapter::stop()
00048   {
00049     return to_local(m_obj->stop());
00050   }
00051     
00052   double ExecutionContextAdapter::get_rate() const
00053   {
00054     return m_obj->get_rate();
00055   }
00056     
00057   ReturnCode_t ExecutionContextAdapter::set_rate(double rate)
00058   {
00059     return to_local(m_obj->set_rate(rate));
00060   }
00061   
00062   ReturnCode_t
00063   ExecutionContextAdapter::add_component(ILightweightRTObject& comp)
00064   {
00065     RTC::LightweightRTObject_ptr rtobj;
00066     rtobj = to_reference<RTC::LightweightRTObject>(&comp);
00067     return to_local(m_obj->add_component(rtobj));
00068   }
00069   
00070   ReturnCode_t
00071   ExecutionContextAdapter::remove_component(ILightweightRTObject& comp)
00072   {
00073     RTC::LightweightRTObject_ptr rtobj;
00074     rtobj = to_reference<RTC::LightweightRTObject>(&comp);
00075     return to_local(m_obj->remove_component(rtobj));
00076   }
00077   
00078   ReturnCode_t
00079   ExecutionContextAdapter::activate_component(ILightweightRTObject& comp)
00080   {
00081     RTC::LightweightRTObject_ptr rtobj;
00082     rtobj = to_reference<RTC::LightweightRTObject>(&comp);
00083     return to_local(m_obj->activate_component(rtobj));
00084   }
00085   
00086   ReturnCode_t
00087   ExecutionContextAdapter::deactivate_component(ILightweightRTObject& comp)
00088   {
00089     RTC::LightweightRTObject_ptr rtobj;
00090     rtobj = to_reference<RTC::LightweightRTObject>(&comp);
00091     return to_local(m_obj->deactivate_component(rtobj));
00092   }
00093   
00094   ReturnCode_t
00095   ExecutionContextAdapter::reset_component(ILightweightRTObject& comp)
00096   {
00097     RTC::LightweightRTObject_ptr rtobj;
00098     rtobj = to_reference<RTC::LightweightRTObject>(&comp);
00099     return to_local(m_obj->reset_component(rtobj));
00100   }
00101   
00102   LifeCycleState
00103   ExecutionContextAdapter::get_component_state(ILightweightRTObject& comp)
00104   {
00105     RTC::LightweightRTObject_ptr rtobj;
00106     rtobj = to_reference<RTC::LightweightRTObject>(&comp);
00107     return to_local(m_obj->get_component_state(rtobj));
00108   }
00109   
00110   ExecutionKind
00111   ExecutionContextAdapter::get_kind() const
00112   {
00113     return to_local(m_obj->get_kind());
00114   }
00115   
00116 //  const ExecutionContextProfile&
00117 //  ExecutionContextAdapter::get_profile() const
00118 //  {
00119 //    m_profile = to_local(m_obj->get_profile());
00120 //    return m_profile;
00121 //  }
00122 };     // namespace CORBA
00123 };     // namespace RTC


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Thu Aug 27 2015 14:16:37