|
| bool | getBlock (GameCtx &oCtx, const std::string &sName, Block &oBlock) |
| | Return named block. More...
|
| |
| Event * | parseChildEvent (GameCtx &oCtx, const xmlpp::Element *p0Element) |
| | Parses an event and adds it to the level. More...
|
| |
| void | parseEventBase (GameCtx &oCtx, const xmlpp::Element *p0Element, Event::Init &oInit) |
| | Parse event base. More...
|
| |
| Event * | integrateAndAdd (GameCtx &oCtx, unique_ptr< Event > refEvent, const xmlpp::Element *p0Element) |
| | Integrate the event add to level. More...
|
| |
| int32_t | parseEventAttrRepeat (GameCtx &oCtx, const xmlpp::Element *p0EventElement) |
| | Helper function for the 'repeat' attribute. More...
|
| |
| int32_t | parseEventAttrStep (GameCtx &oCtx, const xmlpp::Element *p0EventElement) |
| | Helper function for the 'step' attribute. More...
|
| |
| int32_t | parseEventAttrRandomProb (GameCtx &oCtx, const xmlpp::Element *p0EventElement) |
| | Helper function for the 'prob' attribute. More...
|
| |
| bool | isReservedChildElementOfEvent (const std::string &sElementName) const |
| | Tells whether a child element name of Event is reserved. More...
|
| |
| XmlConditionalParser & | getXmlConditionalParser () |
| | Get the conditional parser. More...
|
| |
| XmlTraitsParser & | getXmlTraitsParser () |
| | Get the traits parser. More...
|
| |
| int32_t stmg::XmlRandomEventParser::parseEventListenerGroupName |
( |
GameCtx & |
oCtx, |
|
|
const xmlpp::Element * |
p0Element, |
|
|
const std::string & |
sAttr, |
|
|
const std::string & |
sListenerGroupName |
|
) |
| |
|
overridevirtual |
Returns event type listener group value from name.
Usually listener group the name is the same as defined in the event class as an enum without the 'LISTENER_GROUP_' prefix.
Since also the Event base class has at least the LISTENER_GROUP_FINISHED enum and therefore the name 'FINISHED' defined, subclasses of this function should call XmlEventParser::parseEventListenerGroupName() after checking their own enums.
- Parameters
-
| oCtx | The game context. |
| p0Element | The element containing the the attribute. Cannot be null. |
| sAttr | The attribute name containing the listener group name. Cannot be empty. |
| sListenerGroupName | The listener group name. Cannot be empty. |
- Returns
- The listener group value.
- Exceptions
-
| If | the listener group name is unknown. |
Reimplemented from stmg::XmlEventParser.