OpenRTM-aist 2.0.2
|
ConnectorDataListener holder class. More...
#include <ConnectorListener.h>
Public Member Functions | |
ConnectorDataListenerHolder () | |
Constructor . | |
virtual | ~ConnectorDataListenerHolder () |
Destructor . | |
void | addListener (ConnectorDataListener *listener, bool autoclean) |
Add the listener. | |
void | removeListener (ConnectorDataListener *listener) |
Remove the listener. | |
size_t | size () |
Getting number of listeners. | |
virtual ReturnCode | notify (ConnectorInfo &info, ByteData &cdrdata, const std::string &marshalingtype) |
Notify listeners. | |
virtual ReturnCode | notifyIn (ConnectorInfo &info, ByteData &data) |
virtual ReturnCode | notifyOut (ConnectorInfo &info, ByteData &data) |
template<class DataType > | |
ReturnCode | notifyIn (ConnectorInfo &info, DataType &typeddata) |
Notify listeners. (Typed data version) | |
template<class DataType > | |
ReturnCode | notifyOut (ConnectorInfo &info, DataType &typeddata) |
Notify listeners. (Typed data version) | |
template<class DataType > | |
ReturnCode | notify (ConnectorInfo &info, DataType &typeddata, const std::string &marshalingtype) |
Notify listeners. (Typed data version) | |
Public Attributes | |
USE_CONNLISTENER_STATUS | |
Protected Attributes | |
std::vector< Entry > | m_listeners |
std::mutex | m_mutex |
ByteDataStreamBase * | m_cdr { nullptr } |
std::string | m_marshalingtype |
Additional Inherited Members | |
![]() | |
enum | Enum { NO_CHANGE = 0 , INFO_CHANGED = 1 << 0 , DATA_CHANGED = 1 << 1 , BOTH_CHANGED = INFO_CHANGED | DATA_CHANGED } |
ConnectorDataListener holder class.
This class manages one ore more instances of ConnectorDataListener class.
RTC::ConnectorDataListenerHolder::ConnectorDataListenerHolder | ( | ) |
Constructor .
|
virtual |
Destructor .
void RTC::ConnectorDataListenerHolder::addListener | ( | ConnectorDataListener * | listener, |
bool | autoclean ) |
Add the listener.
This method adds the listener.
listener | Added listener |
autoclean | true:The listener is deleted at the destructor., false:The listener is not deleted at the destructor. |
|
virtual |
Notify listeners.
This calls the Callback method of the registered listener.
info | ConnectorInfo |
cdrdata | Data |
Reimplemented in RTC::ConnectorDataListenerHolderT< DataType >.
Referenced by notifyIn(), and notifyOut().
|
inline |
Notify listeners. (Typed data version)
This calls the Callback method of the registered listener. This operation calls only ConnectorDataListenerT type callback.
info | ConnectorInfo |
typeddata | Data |
marshalingtype |
References RTC::createSerializer(), RTC::ByteDataStreamBase::isLittleEndian(), m_cdr, m_listeners, m_marshalingtype, m_mutex, RTC::ConnectorListenerStatus::NO_CHANGE, RTC::ConnectorInfo::properties, and RTC::ByteDataStream< DataType >::serialize().
|
virtual |
Reimplemented in RTC::ConnectorDataListenerHolderT< DataType >.
Referenced by RTC::ConnectorListenersBase::notifyIn().
|
inline |
Notify listeners. (Typed data version)
info | ConnectorInfo |
typeddata | Data |
References notify(), and RTC::ConnectorInfo::properties.
|
virtual |
Reimplemented in RTC::ConnectorDataListenerHolderT< DataType >.
Referenced by RTC::ConnectorListenersBase::notifyOut().
|
inline |
Notify listeners. (Typed data version)
info | ConnectorInfo |
typeddata | Data |
References notify(), and RTC::ConnectorInfo::properties.
void RTC::ConnectorDataListenerHolder::removeListener | ( | ConnectorDataListener * | listener | ) |
Remove the listener.
This method removes the listener.
listener | Removed listener |
size_t RTC::ConnectorDataListenerHolder::size | ( | ) |
Getting number of listeners.
This method returns current number of listenrs.
|
protected |
Referenced by notify(), and RTC::ConnectorDataListenerHolderT< DataType >::notify().
|
protected |
Referenced by notify(), and RTC::ConnectorDataListenerHolderT< DataType >::notify().
|
protected |
Referenced by notify(), and RTC::ConnectorDataListenerHolderT< DataType >::notify().
|
protected |
Referenced by notify(), and RTC::ConnectorDataListenerHolderT< DataType >::notify().
RTC::ConnectorDataListenerHolder::USE_CONNLISTENER_STATUS |