19#ifndef RTC_PORTCONNECTLISTENER_H
20#define RTC_PORTCONNECTLISTENER_H
24#include <rtm/idl/RTCSkel.h>
136 RTC::ConnectorProfile& profile) = 0;
256 RTC::ConnectorProfile& profile,
257 ReturnCode_t ret) = 0;
279 using Entry = std::pair<PortConnectListener*, bool>;
358 void notify(
const char* portname, RTC::ConnectorProfile& profile);
361 std::vector<Entry> m_listeners;
384 using Entry = std::pair<PortConnectRetListener*, bool>;
465 void notify(
const char* portname, RTC::ConnectorProfile& profile,
469 std::vector<Entry> m_listeners;
627 if (
static_cast<uint8_t
>(type) < portconnect_.size())
629 portconnect_[
static_cast<uint8_t
>(type)].
notify(portname, profile);
661 if (
static_cast<uint8_t
>(type) < portconnret_.size())
663 portconnret_[
static_cast<uint8_t
>(type)].
notify(portname, profile, ret);
PortConnectListener holder class.
Definition PortConnectListener.h:278
PortConnectListenerHolder()
Constructor .
void notify(const char *portname, RTC::ConnectorProfile &profile)
Notify listeners.
void removeListener(PortConnectListener *listener)
Remove the listener.
virtual ~PortConnectListenerHolder()
Destructor .
void addListener(PortConnectListener *listener, bool autoclean)
Add the listener.
PortConnectListener class.
Definition PortConnectListener.h:84
static const char * toString(PortConnectListenerType type)
Convert PortConnectListenerType into the string.
virtual ~PortConnectListener()
Destructor .
virtual void operator()(const char *portname, RTC::ConnectorProfile &profile)=0
Virtual Callback function.
PortConnectListeners class.
Definition PortConnectListener.h:487
~PortConnectListeners()
Destructor .
bool removeListener(PortConnectListenerType type, PortConnectListener *listener)
Remove the listener.
PortConnectListeners()
Constructor .
bool removeListener(PortConnectRetListenerType type, PortConnectRetListener *listener)
Remove the listener.
bool notify(PortConnectListenerType type, const char *portname, RTC::ConnectorProfile &profile)
Definition PortConnectListener.h:625
bool notify(PortConnectRetListenerType type, const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Definition PortConnectListener.h:658
bool addListener(PortConnectRetListenerType type, PortConnectRetListener *listener, bool autoclean=true)
Add the listener.
bool addListener(PortConnectListenerType type, PortConnectListener *listener, bool autoclean=true)
Add the listener.
PortConnectRetListener holder class.
Definition PortConnectListener.h:383
void notify(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)
Notify listeners.
void addListener(PortConnectRetListener *listener, bool autoclean)
Add the listener.
virtual ~PortConnectRetListenerHolder()
Destructor .
void removeListener(PortConnectRetListener *listener)
Remove the listener.
PortConnectRetListenerHolder()
Constructor .
PortConnectRetListener class.
Definition PortConnectListener.h:204
virtual ~PortConnectRetListener()
Destructor .
static const char * toString(PortConnectRetListenerType type)
Convert PortConnectRetListenerType into string.
virtual void operator()(const char *portname, RTC::ConnectorProfile &profile, ReturnCode_t ret)=0
Virtual Callback function.
PortConnectListenerType
The types of ConnectorDataListener.
Definition PortConnectListener.h:51
@ ON_UNSUBSCRIBE_INTERFACES
@ PORT_CONNECT_LISTENER_NUM
PortConnectRetListenerType
The types of PortConnectRetListenerType.
Definition PortConnectListener.h:163
@ ON_SUBSCRIBE_INTERFACES
@ PORT_CONNECT_RET_LISTENER_NUM