|
stmm-games-doc
0.32.0
|

Public Member Functions | |
| virtual | ~XmlGameWidgetParser ()=default |
| XmlGameWidgetParser (const std::string &sGameWidgetName) | |
| Constructor. More... | |
| const std::string & | getGameWidgetName () const |
| The game widget name. More... | |
| virtual shared_ptr< GameWidget > | parseGameWidget (LayoutCtx &oCtx, const xmlpp::Element *p0Element)=0 |
| Parses a game widget element. More... | |
Protected Member Functions | |
| XmlConditionalParser & | getXmlConditionalParser () |
| XmlTraitsParser & | getXmlTraitsParser () |
| XmlImageParser & | getXmlImageParser () |
| void | parseGameWidget (GameWidget::Init &oInit, LayoutCtx &oCtx, const xmlpp::Element *p0Element) |
| Parse the base class attributes of GameWidget. More... | |
| void | parseRelSizedGameWidget (RelSizedGameWidget::Init &oInit, LayoutCtx &oCtx, const xmlpp::Element *p0Element) |
| Parse the base class attributes of RelSizedGameWidget. More... | |
| void | parseContainerWidget (ContainerWidget::Init &oInit, LayoutCtx &oCtx, const xmlpp::Element *p0WidgetElement) |
| Parse the base class attributes of ContainerWidget. More... | |
| void | parseContainerWidget (ContainerWidget::Init &oInit, LayoutCtx &oCtx, const xmlpp::Element *p0WidgetElement, const std::vector< std::string const *> &aSkipChildNames) |
| Parse the base class attributes of ContainerWidget. More... | |
| std::vector< shared_ptr< GameWidget > > | parseChildWidgets (LayoutCtx &oCtx, const xmlpp::Element *p0Parent) |
| Parse the child game widgets. More... | |
| std::vector< shared_ptr< GameWidget > > | parseChildWidgets (LayoutCtx &oCtx, const xmlpp::Element *p0Parent, const std::vector< std::string const *> &aSkipChildNames) |
| Parse the child game widgets with exceptions. More... | |
| std::pair< std::string, int32_t > | parseEvIdMessage (ConditionalCtx &oCtx, const xmlpp::Element *p0Element, bool bMandatory, const std::string &sEvIdAttrName, const std::string &sMsgNameAttrName, const std::string &sMsgAttrName) |
| Get event and message id for an event, given message name. More... | |
| std::pair< int32_t, OwnerType > | parseVariable (LayoutCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sVarNameAttrName, bool bMandatory) |
|
virtualdefault |
| stmg::XmlGameWidgetParser::XmlGameWidgetParser | ( | const std::string & | sGameWidgetName | ) |
Constructor.
| sGameWidgetName | The game widget element name. Cannot be empty. |
| const std::string& stmg::XmlGameWidgetParser::getGameWidgetName | ( | ) | const |
The game widget name.
|
protected |
|
protected |
|
protected |
|
protected |
Parse the child game widgets.
This is used by container widgets.
| oCtx | The context. |
| p0Parent | The parent element. Cannot be null. |
|
protected |
Parse the child game widgets with exceptions.
Even the child names that are skipped are added as valid child names with oCtx.addValidChildElementName(). There is therefore no need to check the valid names when oCtx.removeChecker() is called.
| oCtx | The context. |
| p0Parent | The parent element. Cannot be null. |
| aSkipChildNames | The child element names that shouldn't be parsed. |
|
protected |
Parse the base class attributes of ContainerWidget.
Call this method if your widget is a container.
| oInit | The init structure to fill. |
| oCtx | The context. |
| p0WidgetElement | The element. Cannot be null. |
|
protected |
Parse the base class attributes of ContainerWidget.
Call this method if your widget is a container and some child widget element names must be ignored.
| oInit | The init structure to fill. |
| oCtx | The context. |
| p0WidgetElement | The element. Cannot be null. |
| aSkipChildNames | The child names ti skip. |
|
protected |
Get event and message id for an event, given message name.
The event must have been added to the level with its id.
| oCtx | The context. |
| p0Element | The element containing the attributes. Cannot be null. |
| bMandatory | Whether event id and message must be defined. |
| sEvIdAttrName | The attribute name containing the event id. Cannot be empty. |
| sMsgNameAttrName | The attribute name containing the message. Cannot be empty. |
| sMsgAttrName | The attribute name containing the message name. Cannot be empty. |
| std::runtime_error | If the event with given id doesn't exist or the message name isn't an input to said event or the attributes are not defined and mandatory is true, etc. |
|
pure virtual |
Parses a game widget element.
| oCtx | The context. |
| p0Element | The element. Cannot be null. |
| std::runtime_error. |
Implemented in stmg::XmlActionsBoxWidgetParser, stmg::XmlBoxWidgetParser, stmg::XmlActionWidgetParser, stmg::XmlVolatileWidgetParser, stmg::XmlBackgroundWidgetParser, stmg::XmlInputBoxWidgetParser, stmg::XmlLevelShowWidgetParser, stmg::XmlPreviewWidgetParser, stmg::XmlProgressWidgetParser, stmg::XmlTransparentWidgetParser, and stmg::XmlVarWidgetParser.
|
protected |
Parse the base class attributes of GameWidget.
Call this method if your widget derives directly from GameWidget.
| oInit | The init structure to fill. |
| oCtx | The context. |
| p0Element | The element. Cannot be null. |
|
protected |
Parse the base class attributes of RelSizedGameWidget.
Call this method if your widget derives directly from RelSizedGameWidget.
| oInit | The init structure to fill. |
| oCtx | The context. |
| p0Element | The element. Cannot be null. |
1.8.13