23#include <boost/statechart/event.hpp>
24#include <boost/statechart/simple_state.hpp>
25#include <boost/statechart/state.hpp>
27#include <boost/mpl/for_each.hpp>
28#include <boost/mpl/list.hpp>
29#include <boost/mpl/transform.hpp>
30#include <rclcpp/rclcpp.hpp>
38#include "smacc2_msgs/msg/smacc_transition.hpp"
40namespace sc = boost::statechart;
44namespace introspection
78#if (__GNUC__ && __cplusplus && __GNUC__ >= 3)
80 char *
res = abi::__cxa_demangle(name, 0, 0, &
status);
88 return std::string(name);
90 return std::string(name);
116template <
typename...>
126 typedef char YesType[1];
127 typedef char NoType[2];
129 template <
typename C>
130 static YesType &
test(
decltype(&C::getEventLabel));
131 template <
typename C>
137 value =
sizeof(
test<T>(0)) ==
sizeof(YesType)
142typename std::enable_if<HasEventLabel<T>::value,
void>::type
EventLabel(std::string & label)
144 label = T::getEventLabel();
148typename std::enable_if<!HasEventLabel<T>::value,
void>::type
EventLabel(std::string & label)
161 template <
typename C>
163 template <
typename C>
195 template <
typename C>
197 template <
typename C>
240template <
typename TTransition>
246 template <
typename T>
250 if (std::is_base_of<T, TTransition>::value || std::is_same<T, TTransition>::value)
258template <
typename TTransition>
263 using boost::mpl::_1;
264 using wrappedList =
typename boost::mpl::transform<DEFAULT_TRANSITION_TYPES, _1>::type;
266 boost::mpl::for_each<wrappedList>(
op);
static NoType & test(...)
static YesType & test(decltype(&C::getDefaultTransitionTag))
static NoType & test(...)
static YesType & test(decltype(&C::getDefaultTransitionType))
static YesType & test(decltype(&C::getEventLabel))
static NoType & test(...)
boost::mpl::list< SUCCESS, ABORT, CANCEL, CONTINUELOOP, ENDLOOP > DEFAULT_TRANSITION_TYPES
std::enable_if< HasAutomaticTransitionType< T >::value, void >::type automaticTransitionType(std::string &transition_type)
auto optionalNodeHandle(std::shared_ptr< T > &obj) -> T *
std::enable_if< HasEventLabel< T >::value, void >::type EventLabel(std::string &label)
static std::string getTransitionType()
std::allocator< boost::statechart::none > SmaccAllocator
std::string demangleSymbol()
std::enable_if< HasAutomaticTransitionTag< T >::value, void >::type automaticTransitionTag(std::string &transition_name)
std::string demangledTypeName()
std::string demangleType(const std::type_info *tinfo)
void transitionInfoToMsg(const SmaccTransitionInfo &transition, smacc2_msgs::msg::SmaccTransition &transitionMsg)
std::string * transitionTypeName
CheckType(std::string *transitionTypeName)