19 #ifndef RTC_COMPONENTACTIONLISTENER_H 20 #define RTC_COMPONENTACTIONLISTENER_H 25 #include <rtm/idl/RTCSkel.h> 153 static const char*
const typeString[] =
160 "PRE_ON_DEACTIVATED",
165 "PRE_ON_STATE_UPDATE",
166 "PRE_ON_RATE_CHANGED",
167 "PRE_COMPONENT_ACTION_LISTENER_NUM" 169 return typeString[
static_cast<uint8_t
>(type)];
198 virtual void operator()(
UniqueId ec_id) = 0;
320 static const char*
const typeString[] =
322 "POST_ON_INITIALIZE",
327 "POST_ON_DEACTIVATED",
332 "POST_ON_STATE_UPDATE",
333 "POST_ON_RATE_CHANGED",
334 "POST_COMPONENT_ACTION_LISTENER_NUM" 336 return typeString[
static_cast<uint8_t
>(type)];
365 virtual void operator()(
UniqueId ec_id,
366 ReturnCode_t ret) = 0;
440 static const char*
const typeString[] =
444 "PORT_ACTION_LISTENER_NUM" 446 return typeString[
static_cast<uint8_t
>(type)];
475 virtual void operator()(const ::RTC::PortProfile& pprof) = 0;
550 static const char*
const typeString[] =
554 "EC_ACTION_LISTENER_NUM" 556 return typeString[
static_cast<uint8_t
>(type)];
585 virtual void operator()(
UniqueId ec_id) = 0;
609 using Entry = std::pair<PreComponentActionListener*, bool>;
691 std::vector<Entry> m_listeners;
714 using Entry = std::pair<PostComponentActionListener*, bool>;
794 void notify(
UniqueId ec_id, ReturnCode_t ret);
797 std::vector<Entry> m_listeners;
821 using Entry = std::pair<PortActionListener*, bool>;
901 void notify(
const RTC::PortProfile& pprofile);
904 std::vector<Entry> m_listeners;
926 using Entry = std::pair<ExecutionContextActionListener*, bool>;
1007 std::vector<Entry> m_listeners;
1262 if (static_cast<uint8_t>(type) < preaction_.size())
1264 preaction_[
static_cast<uint8_t
>(type)].notify(ec_id);
1293 if (static_cast<uint8_t>(type) < postaction_.size())
1295 postaction_[
static_cast<uint8_t
>(type)].notify(ec_id, ret);
1322 if (static_cast<uint8_t>(type) < portaction_.size())
1324 portaction_[
static_cast<uint8_t
>(type)].notify(pprofile);
1351 if (static_cast<uint8_t>(type) < ecaction_.size())
1353 ecaction_[
static_cast<uint8_t
>(type)].notify(ec_id);
1404 #endif // RTC_COMPONENTACTIONLISTENER_H
static const char * toString(PortActionListenerType type)
Convert PreComponentActionListenerType into the string.
Definition: ComponentActionListener.h:436
PreComponentActionListener holder class.
Definition: ComponentActionListener.h:607
ExecutionContextActionListener holder class.
Definition: ComponentActionListener.h:924
PortActionListener holder class.
Definition: ComponentActionListener.h:819
PreComponentActionListenerType
The types of ConnectorDataListener.
Definition: ComponentActionListener.h:59
static const char * toString(ExecutionContextActionListenerType type)
Convert PreComponentActionListenerType into the string.
Definition: ComponentActionListener.h:546
bool notify(PortActionListenerType type, const RTC::PortProfile &pprofile)
Definition: ComponentActionListener.h:1320
PortActionListenerType
The types of PortActionListener.
Definition: ComponentActionListener.h:383
PreComponentActionListener class.
Definition: ComponentActionListener.h:122
ExecutionContextHandle_t UniqueId
Definition: ComponentActionListener.h:34
static const char * toString(PostComponentActionListenerType type)
Convert PostComponentActionListenerType into the string.
Definition: ComponentActionListener.h:315
bool notify(PostComponentActionListenerType type, UniqueId ec_id, ReturnCode_t ret)
Definition: ComponentActionListener.h:1291
ComponentActionListeners class.
Definition: ComponentActionListener.h:1025
PostComponentActionListener holder class.
Definition: ComponentActionListener.h:712
bool notify(ExecutionContextActionListenerType type, UniqueId ec_id)
Definition: ComponentActionListener.h:1349
static const char * toString(PreComponentActionListenerType type)
Convert PreComponentActionListenerType into the string.
Definition: ComponentActionListener.h:148
bool notify(PreComponentActionListenerType type, UniqueId ec_id)
Definition: ComponentActionListener.h:1260
PostComponentActionListenerType
The types of ConnectorDataListener.
Definition: ComponentActionListener.h:225
PortActionListener class.
Definition: ComponentActionListener.h:410
ExecutionContextActionListenerType
The types of ExecutionContextActionListener.
Definition: ComponentActionListener.h:493
PostComponentActionListener class.
Definition: ComponentActionListener.h:289
ExecutionContextActionListener class.
Definition: ComponentActionListener.h:520