CORBAServantBase.h
Go to the documentation of this file.
1 // -*- C++ -*-
19 #ifndef DOIL_CORBA_CORBASERVANTBASE_H
20 #define DOIL_CORBA_CORBASERVANTBASE_H
21 
22 #include <string>
23 #include <rtm/config_rtc.h>
24 #include <doil/ServantBase.h>
25 #include <doil/ImplBase.h>
26 #include <doil/corba/CORBA.h>
27 
28 namespace doil
29 {
30 namespace CORBA
31 {
33  : public doil::ServantBase,
34 #ifdef RTC_CORBA_CXXMAPPING11
35  public virtual PortableServer::ServantBase
36 #else
37  public virtual PortableServer::RefCountServantBase
38 #endif
39  {
40  public:
42  : m_refcount(1), m_id(impl->id()), m_name(impl->name())
43  {
44  }
45  virtual ~CORBAServantBase(){}
46 
47  virtual const char* id() const
48  {
49  return m_id.c_str();
50  }
51 
52  virtual const char* name() const
53  {
54  return m_name.c_str();
55  }
56 
57  virtual void incRef()
58  {
59  ++m_refcount;
60  }
61 
62  virtual void decRef()
63  {
64  --m_refcount;
65  if (m_refcount == 0)
66  delete this;
67  }
68 
69  protected:
71  std::string m_id;
72  std::string m_name;
73 
74  };
75 }; // namespoace doil
76 }; // namespace CORBA
77 #endif // DOIL_CORBA_CORBASERVANTBASE_H
78 
virtual const char * name() const
doil implementation base class
virtual const char * id() const
doil implementation base class
doil CORBA header


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:42