rtc/corba/util.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef RTC_CORBA_UTIL_H
21 #define RTC_CORBA_UTIL_H
22 
23 #include <rtc/IRTC.h>
24 #include <rtc/corba/idl/RTCSkel.h>
25 #include <doil/ImplBase.h>
26 #include <assert.h>
27 
28 
29 namespace RTC
30 {
31 namespace CORBA
32 {
33  template <typename Local, typename Remote>
34  bool to_remote(Local* lobj, Remote* robj)
35  {
37  l = dynamic_cast<doil::ImplBase*>(lobj);
38  if (l != NULL) return false;
39  ::CORBA::Object_ptr r;
41  if (!::CORBA::is_nil(r)) return false;
42  robj = Remote::_narrow(r);
43  return true;
44  }
45 
50  {
51  return RTC::Local::ReturnCode_t((int)x);
52  }
53 
58  {
59  return RTC::ReturnCode_t((int)x);
60  }
61 
66  {
67  return RTC::Local::ExecutionKind((int)x);
68  }
69 
74  {
75  return RTC::ExecutionKind((int)x);
76  }
77 
83  {
84  return RTC::Local::PortInterfacePolarity((int)x);
85  }
86 
91  {
92  return RTC::PortInterfacePolarity((int)x);
93  }
94 
100  {
101  return RTC::Local::LifeCycleState((int)x);
102  }
103 
108  {
109  return RTC::LifeCycleState((int)x);
110  }
111 
112 
113 
115  {
117  l.kind = to_local(x.kind);
118  l.rate = x.rate;
119  // l.owner = NULL;
120  // l.participoants =
121  // properties =
122  return l;
123  }
124 
125 };
126 };
127 #endif // RTC_CORBA_UTIL_H
RT-Component.
bool to_remote(Local *lobj, Remote *robj)
ReturnCode_t
Definition: doil.h:53
static CORBAManager & instance()
getting instance
::CORBA::Object_ptr toReference(doil::ImplBase *impl)
Converting Impl object to object reference.
doil implementation base class
ExecutionKind
Definition: IRTC.h:48
ReturnCode_t
Definition: IRTC.h:30
RTC interfaces.
LifeCycleState
Definition: IRTC.h:40
RTC::Local::ReturnCode_t to_local(RTC::ReturnCode_t x)
RTC::ReturnCode_t -> RTC::Local::ReturnCode_t conversion.
RTC::Local::ExecutionContextProfile ExecutionContextProfile
PortInterfacePolarity
Definition: IRTC.h:55


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:56