Orxonox
0.0.5 Codename: Arcturus
|
Definition of the XMLPortEventState() macro, as well as some more useful macros. More...
Go to the source code of this file.
Macros | |
#define | CreateEventName(classname, name) static std::string eventname##classname##name = #name |
Defines a new event name for a class. More... | |
#define | FireEventName(classname, name) eventname##classname##name |
This macro is needed to fire an event with this name. More... | |
#define | XMLPortEventSink(classname, subclassname, statename, function, xmlelement, mode) |
Like XMLPortEventState but creates an event sink instead of an event state. More... | |
#define | XMLPortEventState(classname, subclassname, statename, function, xmlelement, mode) |
Defines a new event state (a state of the object which can be changed by events). More... | |
#define | XMLPortEventStateIntern(name, classname, statename, xmlelement, mode) |
#define | XMLPortEventStateTemplate(classname, subclassname, statename, function, xmlelement, mode, ...) |
Definition of the XMLPortEventState() macro, as well as some more useful macros.
#define CreateEventName | ( | classname, | |
name | |||
) | static std::string eventname##classname##name = #name |
Defines a new event name for a class.
Named events can only have names which were defined with this macro.
classname | The name of the class |
name | The name of the event |
#define FireEventName | ( | classname, | |
name | |||
) | eventname##classname##name |
This macro is needed to fire an event with this name.
The event name must previously be declared with CreateEventName.
#define XMLPortEventSink | ( | classname, | |
subclassname, | |||
statename, | |||
function, | |||
xmlelement, | |||
mode | |||
) |
Like XMLPortEventState but creates an event sink instead of an event state.
The most important destinction between an EventState and an EventSink is, that an EventState only processes events which change the state of the EventState, where as an EventSink is an EventState that processes any Event that reaches it.
#define XMLPortEventState | ( | classname, | |
subclassname, | |||
statename, | |||
function, | |||
xmlelement, | |||
mode | |||
) |
Defines a new event state (a state of the object which can be changed by events).
classname | The name of this class |
subclassname | Usually BaseObject - if different, only instances of this class can send events to this object |
statename | The name (string) of this state |
function | The function which should be used to set the state |
xmlelement | Argument for XMLPort |
mode | Argument for XMLPort |
#define XMLPortEventStateIntern | ( | name, | |
classname, | |||
statename, | |||
xmlelement, | |||
mode | |||
) |
#define XMLPortEventStateTemplate | ( | classname, | |
subclassname, | |||
statename, | |||
function, | |||
xmlelement, | |||
mode, | |||
... | |||
) |