PortConnectListener.h
Go to the documentation of this file.
1 // -*- C++ -*-
19 #ifndef RTC_PORTCONNECTLISTENER_H
20 #define RTC_PORTCONNECTLISTENER_H
21 
22 #include <vector>
23 #include <utility>
24 #include <coil/Mutex.h>
25 #include <coil/Guard.h>
26 #include <rtm/RTC.h>
27 #include <rtm/idl/RTCSkel.h>
28 
29 namespace RTC
30 {
31  //============================================================
50  {
55  };
56 
83  {
84  public:
108  static const char* toString(PortConnectListenerType type);
109 
117  virtual ~PortConnectListener();
118 
134  virtual void operator()(const char* portname,
135  RTC::ConnectorProfile& profile) = 0;
136  };
137 
138 
139  //============================================================
162  {
170  };
171 
203  {
204  public:
228  static const char* toString(PortConnectRetListenerType type);
229 
237  virtual ~PortConnectRetListener();
238 
254  virtual void operator()(const char* portname,
255  RTC::ConnectorProfile& profile,
256  ReturnCode_t ret) = 0;
257  };
258 
259  //============================================================
277  {
278  typedef std::pair<PortConnectListener*, bool> Entry;
280  public:
289 
297  virtual ~PortConnectListenerHolder();
298 
320  void addListener(PortConnectListener* listener, bool autoclean);
321 
339  void removeListener(PortConnectListener* listener);
340 
358  void notify(const char* portname, RTC::ConnectorProfile& profile);
359 
360  private:
361  std::vector<Entry> m_listeners;
363  };
364 
365 
383  {
384  typedef std::pair<PortConnectRetListener*, bool> Entry;
386  public:
395 
403  virtual ~PortConnectRetListenerHolder();
404 
426  void addListener(PortConnectRetListener* listener, bool autoclean);
427 
445  void removeListener(PortConnectRetListener* listener);
446 
466  void notify(const char* portname, RTC::ConnectorProfile& profile,
467  ReturnCode_t ret);
468 
469  private:
470  std::vector<Entry> m_listeners;
472  };
473 
488  {
489  public:
512  };
513 
514 
515 }; // namespace RTC
516 
517 #endif // RTC_PORTCONNECTLISTENER_H
PortConnectListenerType
The types of ConnectorDataListener.
coil::Guard< coil::Mutex > Guard
PortConnectRetListener class.
RT-Component.
Mutex class.
ReturnCode_t
Definition: doil.h:53
std::pair< PortConnectRetListener *, bool > Entry
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
coil::Guard< coil::Mutex > Guard
PortConnectListener class.
PortConnectListener holder class.
PortConnectListeners class.
PortConnectRetListener holder class.
static const char * toString(PortConnectListenerType type)
Convert PortConnectListenerType into the string.
virtual void operator()(const char *portname, RTC::ConnectorProfile &profile)=0
Virtual Callback function.
PortConnectRetListenerType
The types of PortConnectRetListenerType.
RTComponent header.
std::pair< PortConnectListener *, bool > Entry
virtual ~PortConnectListener()
Destructor.


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