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)];
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)];
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)];
609 using Entry = std::pair<PreComponentActionListener*, bool>;
691 std::vector<Entry> m_listeners;
714 using Entry = std::pair<PostComponentActionListener*, bool>;
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);
ComponentActionListeners クラス
Definition: ComponentActionListener.h:1026
bool removeListener(PostComponentActionListenerType type, PostComponentActionListener *listener)
リスナーの削除
bool removeListener(PortActionListenerType type, PortActionListener *listener)
リスナーの削除
ComponentActionListeners()
コンストラクタ
bool addListener(ExecutionContextActionListenerType type, ExecutionContextActionListener *listener, bool autoclean)
リスナーの追加
bool notify(ExecutionContextActionListenerType type, UniqueId ec_id)
リスナーへ通知する
Definition: ComponentActionListener.h:1349
bool addListener(PortActionListenerType type, PortActionListener *listener, bool autoclean)
リスナーの追加
bool removeListener(ExecutionContextActionListenerType type, ExecutionContextActionListener *listener)
リスナーの削除
bool notify(PostComponentActionListenerType type, UniqueId ec_id, ReturnCode_t ret)
リスナーへ通知する
Definition: ComponentActionListener.h:1291
bool removeListener(PreComponentActionListenerType type, PreComponentActionListener *listener)
リスナーの削除
~ComponentActionListeners()
デストラクタ
bool addListener(PostComponentActionListenerType type, PostComponentActionListener *listener, bool autoclean)
リスナーの追加
bool addListener(PreComponentActionListenerType type, PreComponentActionListener *listener, bool autoclean)
リスナーの追加
bool notify(PortActionListenerType type, const RTC::PortProfile &pprofile)
リスナーへ通知する
Definition: ComponentActionListener.h:1320
bool notify(PreComponentActionListenerType type, UniqueId ec_id)
リスナーへ通知する
Definition: ComponentActionListener.h:1260
ExecutionContextActionListener ホルダクラス
Definition: ComponentActionListener.h:925
ExecutionContextActionListenerHolder()
コンストラクタ
void removeListener(ExecutionContextActionListener *listener)
リスナーの削除
void addListener(ExecutionContextActionListener *listener, bool autoclean)
リスナーの追加
virtual ~ExecutionContextActionListenerHolder()
デストラクタ
void notify(UniqueId ec_id)
リスナーへ通知する
ExecutionContextActionListener クラス
Definition: ComponentActionListener.h:521
virtual ~ExecutionContextActionListener()
デストラクタ
virtual void operator()(UniqueId ec_id)=0
仮想コールバック関数
static const char * toString(ExecutionContextActionListenerType type)
PreComponentActionListenerType を文字列に変換
Definition: ComponentActionListener.h:546
PortActionListener ホルダクラス
Definition: ComponentActionListener.h:820
PortActionListenerHolder()
コンストラクタ
virtual ~PortActionListenerHolder()
デストラクタ
void removeListener(PortActionListener *listener)
リスナーの削除
void notify(const RTC::PortProfile &pprofile)
リスナーへ通知する
void addListener(PortActionListener *listener, bool autoclean)
リスナーの追加
PortActionListener クラス
Definition: ComponentActionListener.h:411
virtual void operator()(const ::RTC::PortProfile &pprof)=0
仮想コールバック関数
virtual ~PortActionListener()
デストラクタ
static const char * toString(PortActionListenerType type)
PreComponentActionListenerType を文字列に変換
Definition: ComponentActionListener.h:436
PostComponentActionListener ホルダクラス
Definition: ComponentActionListener.h:713
void addListener(PostComponentActionListener *listener, bool autoclean)
リスナーの追加
PostComponentActionListenerHolder()
コンストラクタ
void notify(UniqueId ec_id, ReturnCode_t ret)
リスナーへ通知する
virtual ~PostComponentActionListenerHolder()
デストラクタ
void removeListener(PostComponentActionListener *listener)
リスナーの削除
PostComponentActionListener クラス
Definition: ComponentActionListener.h:290
static const char * toString(PostComponentActionListenerType type)
PostComponentActionListenerType を文字列に変換
Definition: ComponentActionListener.h:315
virtual ~PostComponentActionListener()
デストラクタ
virtual void operator()(UniqueId ec_id, ReturnCode_t ret)=0
仮想コールバック関数
PreComponentActionListener ホルダクラス
Definition: ComponentActionListener.h:608
void removeListener(PreComponentActionListener *listener)
リスナーの削除
PreComponentActionListenerHolder()
コンストラクタ
void notify(UniqueId ec_id)
リスナーへ通知する
void addListener(PreComponentActionListener *listener, bool autoclean)
リスナーの追加
virtual ~PreComponentActionListenerHolder()
デストラクタ
PreComponentActionListener クラス
Definition: ComponentActionListener.h:123
virtual void operator()(UniqueId ec_id)=0
仮想コールバック関数
virtual ~PreComponentActionListener()
デストラクタ
static const char * toString(PreComponentActionListenerType type)
PreComponentActionListenerType を文字列に変換
Definition: ComponentActionListener.h:148
ExecutionContextActionListenerType
ExecutionContextActionListener のタイプ
Definition: ComponentActionListener.h:494
ExecutionContextHandle_t UniqueId
Definition: ComponentActionListener.h:34
PreComponentActionListenerType
PreComponentActionListener のタイプ
Definition: ComponentActionListener.h:60
@ PRE_COMPONENT_ACTION_LISTENER_NUM
PortActionListenerType
PortActionListener のタイプ
Definition: ComponentActionListener.h:384
@ PORT_ACTION_LISTENER_NUM
PostComponentActionListenerType
PostCompoenntActionListener のタイプ
Definition: ComponentActionListener.h:226
@ POST_COMPONENT_ACTION_LISTENER_NUM