|
| static bool | validateName (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sAttrName, const std::string &sName, bool bAllowAny) |
| | Tells whether a string is a valid name. More...
|
| |
| static const xmlpp::Element * | parseUniqueElement (ParserCtx &oCtx, const xmlpp::Element *p0Parent, const std::string &sName, bool bMandatory) |
| |
| static std::pair< bool, std::string > | getAttributeValue (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sAttr0) |
| |
| static std::pair< bool, std::string > | getAttributeValue (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sAttr0, const std::string &sAttr1) |
| |
| static std::string | parseSeparator (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sSeparatorAttr) |
| | Parse for value separator string. More...
|
| |
| static std::pair< bool, IntSet > | parseIntSetAttrs (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sSingleAttr, const std::string &sFromAttr, const std::string &sToAttr, const std::string &sStepAttr, const std::string &sMultiAttr, const std::string &sSeparatorAttr, bool bMin, int32_t nMin, bool bMax, int32_t nMax) |
| | Parse IntSet attributes. More...
|
| |
| template<typename T > |
| static bool | parseAttrFromTo (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sSingleAttr, const std::string &sFromAttr, const std::string &sToAttr, bool bMandatory, bool bMin, T oMin, bool bMax, T oMax, T &oFrom, T &oTo) |
| | Parse from to attributes. More...
|
| |
| template<typename T > |
| static bool | parseAttrFromToClamp (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sSingleAttr, const std::string &sFromAttr, const std::string &sToAttr, bool bMandatory, bool bMin, T oMin, bool bMax, T oMax, T &oFrom, T &oTo) |
| |
| template<class ChildVisitor > |
| static void | visitNamedElementChildren (ParserCtx &oCtx, const xmlpp::Element *p0Element, const std::string &sName, ChildVisitor oChildVisitor) |
| | Visits all child elements of a node that have a certain name. More...
|
| |
| template<class ChildVisitor > |
| static void | visitElementChildren (ParserCtx &oCtx, const xmlpp::Element *p0Element, ChildVisitor oChildVisitor) |
| | Visits all child elements of a node. More...
|
| |
| template<class P > |
| static void | checkAllChildElementsName (ParserCtx &oCtx, const xmlpp::Node *p0Parent, P oP) |
| | Checks whether the names of all the child elements of a node satisfy a predicate. More...
|
| |
| template<class P > |
| static void | checkAllAttributesNames (ParserCtx &oCtx, const xmlpp::Element *p0Element, P oP) |
| | Checks whether all the attributes of an element have a name that satisfies a predicate. More...
|
| |
template<typename T >
| static bool stmg::XmlCommonParser::parseAttrFromTo |
( |
ParserCtx & |
oCtx, |
|
|
const xmlpp::Element * |
p0Element, |
|
|
const std::string & |
sSingleAttr, |
|
|
const std::string & |
sFromAttr, |
|
|
const std::string & |
sToAttr, |
|
|
bool |
bMandatory, |
|
|
bool |
bMin, |
|
|
T |
oMin, |
|
|
bool |
bMax, |
|
|
T |
oMax, |
|
|
T & |
oFrom, |
|
|
T & |
oTo |
|
) |
| |
|
inlinestatic |
Parse from to attributes.
If bMin is false oMin is overridden to std::numeric_limits<T>::lowest(). If bMax is false oMax is overridden to std::numeric_limits<T>::max(). If both true, oMin must not be smaller than oMin.
If no attribute is defined, the values oFrom and oTo are untouched if their current value satisfies the optional min and max conditions. Otherwise they are clamped to (oMin, oMax).
- Parameters
-
| oCtx | The context. |
| p0Element | The element. Cannot be null. |
| sSingleAttr | The single attribute name. |
| sFromAttr | The 'from' attribute name. |
| sToAttr | The 'to' attribute name. |
| bMandatory | Whether one of the attributes must be defined. |
| bMin | Whether the range has a minimum. |
| oMin | The minimum value, if bMin is true. |
| bMax | Whether the range has a maximum. |
| oMax | The maximum value, if bMax is true. |
| oFrom | The resulting 'from' value. Untouched if no attribute defined. |
| oTo | The resulting 'to' value. Untouched if no attribute defined. |
- Returns
- Whether one of the attributes was defined.