stmm-games-doc  0.32.0
Public Member Functions | Static Public Attributes | List of all members
stmg::XmlThemeImageParser Class Reference
Inheritance diagram for stmg::XmlThemeImageParser:
Inheritance graph
[legend]

Public Member Functions

 XmlThemeImageParser (XmlConditionalParser &oXmlConditionalParser)
 
std::pair< std::string, std::string > parseImage (ThemeCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sImgFileAttr, const std::string &sImgIdAttr, bool bAttrMandatory)
 Parses image attributes. More...
 
std::pair< std::string, std::string > parseImage (ThemeCtx &oCtx, const xmlpp::Element *p0Element, bool bAttrMandatory)
 Parses image attributes using attribute name defaults. More...
 
- Public Member Functions inherited from stmg::XmlImageParser
 XmlImageParser (XmlConditionalParser &oXmlConditionalParser)
 
int32_t parseImageId (ConditionalCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sImgIdAttr, bool bAttrMandatory)
 Parses image id. More...
 
int32_t parseImageId (ConditionalCtx &oCtx, const xmlpp::Element *p0Element, bool bAttrMandatory)
 Parses image id using attribute name defaults. More...
 

Static Public Attributes

static const std::string s_sImagesImageNodeName
 The default image node element name. More...
 
static const std::string s_sImagesImageFileAttr
 The default image file attribute name. More...
 
- Static Public Attributes inherited from stmg::XmlImageParser
static const std::string s_sImagesImageIdAttr
 The default image id attribute name. More...
 

Additional Inherited Members

- Protected Attributes inherited from stmg::XmlImageParser
XmlConditionalParserm_oXmlConditionalParser
 

Constructor & Destructor Documentation

◆ XmlThemeImageParser()

stmg::XmlThemeImageParser::XmlThemeImageParser ( XmlConditionalParser oXmlConditionalParser)

Member Function Documentation

◆ parseImage() [1/2]

std::pair<std::string, std::string> stmg::XmlThemeImageParser::parseImage ( ThemeCtx oCtx,
const xmlpp::Element *  p0Element,
const std::string &  sImgFileAttr,
const std::string &  sImgIdAttr,
bool  bAttrMandatory 
)

Parses image attributes.

Parameters
oCtxThe context.
p0ElementThe element. Cannot be null.
sImgFileAttrThe image file attribute. Cannot be empty.
sImgIdAttrThe image id attribute. If empty not parsed.
bAttrMandatoryWhether either attribute must be defined.
Returns
The attribute that defines the image and the image file name.

◆ parseImage() [2/2]

std::pair<std::string, std::string> stmg::XmlThemeImageParser::parseImage ( ThemeCtx oCtx,
const xmlpp::Element *  p0Element,
bool  bAttrMandatory 
)

Parses image attributes using attribute name defaults.

Parameters
oCtxThe context.
p0ElementThe element. Cannot be null.
bAttrMandatoryWhether either attribute must be defined.
Returns
The attribute that defines the image and the image file name.

Member Data Documentation

◆ s_sImagesImageFileAttr

const std::string stmg::XmlThemeImageParser::s_sImagesImageFileAttr
static

The default image file attribute name.

◆ s_sImagesImageNodeName

const std::string stmg::XmlThemeImageParser::s_sImagesImageNodeName
static

The default image node element name.