19#ifndef RTC_FSMACTIONLISTENER_H
20#define RTC_FSMACTIONLISTENER_H
27#include <rtm/idl/RTCSkel.h>
29#include <rtm/idl/ExtendedFsmServiceStub.h>
259 static const char*
const typeString[] =
265 "PRE_ON_STATE_CHANGE",
266 "PRE_FSM_ACTION_LISTENER_NUM"
270 return typeString[
static_cast<uint8_t
>(type)];
502 static const char*
const typeString[] =
508 "POST_ON_STATE_CHANGE",
509 "POST_FSM_ACTION_LISTENER_NUM"
513 return typeString[
static_cast<uint8_t
>(type)];
543 ReturnCode_t ret) = 0;
748 static const char*
const typeString[] =
754 "ADD_FSM_TRANSITION",
755 "REMOVE_FSM_TRANSITION",
758 "FSM_PROFILE_LISTENER_NUM"
762 return typeString[
static_cast<uint8_t
>(type)];
791 virtual void operator()(const ::RTC::FsmProfile& fsmprof) = 0;
969 static const char*
const typeString[] =
973 "FSM_STRUCTURE_LISTENER_NUM"
977 return typeString[
static_cast<uint8_t
>(type)];
1030 using Entry = std::pair<PreFsmActionListener*, bool>;
1112 std::vector<Entry> m_listeners;
1135 using Entry = std::pair<PostFsmActionListener*, bool>;
1215 void notify(
const char* state, ReturnCode_t ret);
1218 std::vector<Entry> m_listeners;
1242 using Entry = std::pair<FsmProfileListener*, bool>;
1323 std::vector<Entry> m_listeners;
1345 using Entry = std::pair<FsmStructureListener*, bool>;
1426 std::vector<Entry> m_listeners;
1681 if (
static_cast<uint8_t
>(type) < preaction_.size())
1683 preaction_[
static_cast<uint8_t
>(type)].
notify(state);
1712 if (
static_cast<uint8_t
>(type) < postaction_.size())
1714 postaction_[
static_cast<uint8_t
>(type)].
notify(state, ret);
1741 if (
static_cast<uint8_t
>(type) < profile_.size())
1743 profile_[
static_cast<uint8_t
>(type)].
notify(profile);
1770 if (
static_cast<uint8_t
>(type) < structure_.size())
1772 structure_[
static_cast<uint8_t
>(type)].
notify(structure);
FsmActionListeners class.
Definition FsmActionListener.h:1445
bool notify(FsmProfileListenerType type, RTC::FsmProfile &profile)
Definition FsmActionListener.h:1739
bool notify(PostFsmActionListenerType type, const char *state, ReturnCode_t ret)
Definition FsmActionListener.h:1710
FsmActionListeners()
Constructor .
bool addListener(PostFsmActionListenerType type, PostFsmActionListener *listener, bool autoclean=true)
Add the listener.
bool notify(PreFsmActionListenerType type, const char *state)
Definition FsmActionListener.h:1679
bool removeListener(FsmProfileListenerType type, FsmProfileListener *listener)
Remove the listener.
~FsmActionListeners()
Destructor .
bool notify(FsmStructureListenerType type, RTC::FsmStructure &structure)
Definition FsmActionListener.h:1768
bool removeListener(PostFsmActionListenerType type, PostFsmActionListener *listener)
Remove the listener.
bool addListener(FsmStructureListenerType type, FsmStructureListener *listener, bool autoclean=true)
Add the listener.
bool addListener(PreFsmActionListenerType type, PreFsmActionListener *listener, bool autoclean=true)
Add the listener.
bool addListener(FsmProfileListenerType type, FsmProfileListener *listener, bool autoclean=true)
Add the listener.
bool removeListener(PreFsmActionListenerType type, PreFsmActionListener *listener)
Remove the listener.
bool removeListener(FsmStructureListenerType type, FsmStructureListener *listener)
Remove the listener.
FsmProfileListener holder class.
Definition FsmActionListener.h:1241
void addListener(FsmProfileListener *listener, bool autoclean)
Add the listener.
void removeListener(FsmProfileListener *listener)
Remove the listener.
void notify(RTC::FsmProfile &profile)
Notify listeners.
FsmProfileListenerHolder()
Constructor .
virtual ~FsmProfileListenerHolder()
Destructor .
FsmProfileListener class.
Definition FsmActionListener.h:723
virtual ~FsmProfileListener()
Destructor .
virtual void operator()(const ::RTC::FsmProfile &fsmprof)=0
Virtual Callback function.
static const char * toString(FsmProfileListenerType type)
Convert FsmProfileListenerType into the string.
Definition FsmActionListener.h:746
FsmStructureListener holder class.
Definition FsmActionListener.h:1344
FsmStructureListenerHolder()
Constructor .
void removeListener(FsmStructureListener *listener)
Remove the listener.
void notify(RTC::FsmStructure &structure)
Notify listeners.
virtual ~FsmStructureListenerHolder()
Destructor .
void addListener(FsmStructureListener *listener, bool autoclean)
Add the listener.
FsmStructureListener class.
Definition FsmActionListener.h:942
virtual void operator()(::RTC::FsmStructure &pprof)=0
Virtual Callback function.
static const char * toString(FsmStructureListenerType type)
Convert FsmStructureListenerType into the string.
Definition FsmActionListener.h:967
virtual ~FsmStructureListener()
Destructor .
PostFsmActionListener holder class.
Definition FsmActionListener.h:1134
void removeListener(PostFsmActionListener *listener)
Remove the listener.
virtual ~PostFsmActionListenerHolder()
Destructor .
void addListener(PostFsmActionListener *listener, bool autoclean)
Add the listener.
PostFsmActionListenerHolder()
Constructor .
void notify(const char *state, ReturnCode_t ret)
Notify listeners.
PostFsmActionListener class.
Definition FsmActionListener.h:475
virtual void operator()(const char *state, ReturnCode_t ret)=0
Virtual Callback function.
static const char * toString(PostFsmActionListenerType type)
Convert PostFsmActionListenerType into the string.
Definition FsmActionListener.h:500
virtual ~PostFsmActionListener()
Destructor .
PreFsmActionListener holder class.
Definition FsmActionListener.h:1029
void addListener(PreFsmActionListener *listener, bool autoclean)
Add the listener.
PreFsmActionListenerHolder()
Constructor .
void removeListener(PreFsmActionListener *listener)
Remove the listener.
virtual ~PreFsmActionListenerHolder()
Destructor .
void notify(const char *state)
Notify listeners.
PreFsmActionListener class.
Definition FsmActionListener.h:232
static const char * toString(PreFsmActionListenerType type)
Convert PreFsmActionListenerType into the string.
Definition FsmActionListener.h:257
virtual ~PreFsmActionListener()
Destructor .
virtual void operator()(const char *)=0
Virtual Callback function.
FsmStructureListenerType
The types of FsmStructureListener.
Definition FsmActionListener.h:812
@ FSM_STRUCTURE_LISTENER_NUM
PreFsmActionListenerType
The types of PreFsmActionListener.
Definition FsmActionListener.h:90
@ PRE_FSM_ACTION_LISTENER_NUM
PostFsmActionListenerType
The types of PostFsmActionListener.
Definition FsmActionListener.h:333
@ POST_FSM_ACTION_LISTENER_NUM
FsmProfileListenerType
The types of FsmProfileListener.
Definition FsmActionListener.h:575
@ FSM_PROFILE_LISTENER_NUM