35 #ifndef _EventIncludes_H__ 36 #define _EventIncludes_H__ 54 #define XMLPortEventState(classname, subclassname, statename, function, xmlelement, mode) \ 55 orxonox::EventState* containername##function = this->getEventState(statename); \ 56 if (!containername##function) \ 58 containername##function = new orxonox::EventState(orxonox::createFunctor(&classname::function, this), orxonox::ClassIdentifier<subclassname>::getIdentifier()); \ 59 this->addEventState(statename, containername##function); \ 61 XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode) 68 #define XMLPortEventSink(classname, subclassname, statename, function, xmlelement, mode) \ 69 orxonox::EventState* containername##function = this->getEventState(statename); \ 70 if (!containername##function) \ 72 containername##function = new orxonox::EventState(orxonox::createFunctor(&classname::function, this), orxonox::ClassIdentifier<subclassname>::getIdentifier(), true); \ 73 this->addEventState(statename, containername##function); \ 75 XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode) 78 #define XMLPortEventStateTemplate(classname, subclassname, statename, function, xmlelement, mode, ...) \ 79 orxonox::EventState* containername##function = this->getEventState(statename); \ 80 if (!containername##function) \ 82 containername##function = new orxonox::EventState(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::function, this), orxonox::ClassIdentifier<subclassname>::getIdentifier()); \ 83 this->addEventState(statename, containername##function); \ 85 XMLPortEventStateIntern(xmlportevent##function, classname, statename, xmlelement, mode) 87 #define XMLPortEventStateIntern(name, classname, statename, xmlelement, mode) \ 88 static orxonox::ExecutorPtr xmlsetfunctorbase##name = orxonox::createExecutor(orxonox::createFunctor(&classname::addEventSource), std::string( #classname ) + "::" + "addEventSource" + '(' + statename + ')'); \ 89 static orxonox::ExecutorPtr xmlgetfunctorbase##name = orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + '(' + statename + ')'); \ 90 static orxonox::ExecutorMemberPtr<classname> xmlsetfunctor##name = std::static_pointer_cast<orxonox::ExecutorMember<classname>>(xmlsetfunctorbase##name); \ 91 static orxonox::ExecutorMemberPtr<classname> xmlgetfunctor##name = std::static_pointer_cast<orxonox::ExecutorMember<classname>>(xmlgetfunctorbase##name); \ 92 xmlsetfunctor##name->setDefaultValue(1, statename); \ 93 xmlgetfunctor##name->setDefaultValue(1, statename); \ 94 XMLPortObjectGeneric(xmlport##name, classname, orxonox::BaseObject, statename, xmlsetfunctor##name, xmlgetfunctor##name, xmlelement, mode, false, true) 103 #define CreateEventName(classname, name) \ 104 static std::string eventname##classname##name = #name 109 #define FireEventName(classname, name) \ 110 eventname##classname##name Shared library macros, enums, constants and forward declarations for the core library ...
Declaration of the XMLPort helper classes and macros.
Declaration of the orxonox::Executor class and the createExecutor() functions.
Declaration of the classes Event and EventState.