Choreonoid  1.5
OpenRTMUtil.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_OPENRTM_PLUGIN_OPENRTM_UTIL_H_INCLUDED
6 #define CNOID_OPENRTM_PLUGIN_OPENRTM_UTIL_H_INCLUDED
7 
8 #include <rtm/Manager.h>
9 #include <rtm/ManagerServant.h>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 CNOID_EXPORT RTM::Manager_ptr getRTCManagerServant();
15 
21 CNOID_EXPORT RTC::RTObject_impl* createManagedRTC(const char* comp_args);
22 
25 
26 
27 template<class ServiceType>
28 typename ServiceType::_ptr_type findRTCService(RTC::RTObject_ptr rtc, const std::string& name)
29 {
30  CORBA::Object_var obj = findRTCService<CORBA::Object>(rtc, name);
31  return CORBA::is_nil(obj) ? ServiceType::_nil() : ServiceType::_narrow(obj);
32 }
33 
34 template<> CNOID_EXPORT CORBA::Object::_ptr_type findRTCService<CORBA::Object>(RTC::RTObject_ptr rtc, const std::string& name);
35 
36 CNOID_EXPORT bool deleteRTC(RTC::RtcBase* rtc, bool waitToBeDeleted = true);
37 }
38 
39 #endif
ServiceType::_ptr_type findRTCService(RTC::RTObject_ptr rtc, const std::string &name)
Definition: OpenRTMUtil.h:28
CNOID_EXPORT RTC::RTObject_impl * createManagedRTC(const char *comp_args)
Definition: OpenRTMPlugin.cpp:282
CNOID_EXPORT int numUnmanagedRTCs()
Definition: OpenRTMPlugin.cpp:293
CNOID_EXPORT RTM::Manager_ptr getRTCManagerServant()
Definition: OpenRTMPlugin.cpp:276
CNOID_EXPORT bool deleteRTC(RTC::RtcBase *rtc, bool waitToBeDeleted=true)
Definition: OpenRTMPlugin.cpp:401
Defines the minimum processing for performing pasing file for STL.
Definition: AbstractSceneLoader.h:9
#define CNOID_EXPORT
Definition: Util/exportdecl.h:37
CNOID_EXPORT int deleteUnmanagedRTCs()
Definition: OpenRTMPlugin.cpp:307