18 #ifndef INCLUDED_PARAMNODE 19 #define INCLUDED_PARAMNODE 212 const std::string&
ToString()
const;
301 #endif // INCLUDED_PARAMNODE const ChildrenMap & GetChildren() const
Returns the names/nodes of the children of this node, ordered by name.
Definition: ParamNode.cpp:304
An entity initialisation parameter node.
Definition: ParamNode.h:150
CParamNode(bool isOk=true)
Constructs a new, empty node.
Definition: ParamNode.cpp:37
A simple fixed-point number class.
Definition: Fixed.h:119
const std::string & ToString() const
Returns the content of this node as an UTF8 string.
Definition: ParamNode.cpp:271
std::string m_Value
Definition: ParamNode.h:291
Definition: XMBData.h:135
int ToInt() const
Parses the content of this node as an integer.
Definition: ParamNode.cpp:281
void ToJSVal(const ScriptRequest &rq, bool cacheValue, JS::MutableHandleValue ret) const
Returns a JS::Value representation of this node and its children.
Definition: ParamNode.cpp:373
std::string ToXMLString() const
Returns the content of this node and its children as an XML string.
Definition: ParamNode.cpp:334
bool m_IsOk
Definition: ParamNode.h:293
void ResetScriptVal()
Definition: ParamNode.cpp:453
float ToFloat() const
Parses the content of this node as a floating-point number.
Definition: ParamNode.cpp:291
ChildrenMap m_Childs
Definition: ParamNode.h:292
uint32_t u32
Definition: types.h:39
Interned 8-bit strings.
Definition: CStrIntern.h:37
u32 PSRETURN
Definition: Errors.h:75
static PSRETURN LoadXMLString(CParamNode &ret, const char *xml, const wchar_t *sourceIdentifier=NULL)
See LoadXML, but parses the XML string xml.
Definition: ParamNode.cpp:57
static void LoadXML(CParamNode &ret, const XMBData &xmb, const wchar_t *sourceIdentifier=NULL)
Loads the XML data specified by file into the node ret.
Definition: ParamNode.cpp:42
fixed ToFixed() const
Parses the content of this node as a fixed-point number.
Definition: ParamNode.cpp:286
const std::wstring ToWString() const
Returns the content of this node as a wstring.
Definition: ParamNode.cpp:266
const CParamNode & GetOnlyChild() const
Returns the only child node, or a node with IsOk() == false if there is none.
Definition: ParamNode.cpp:244
bool IsOk() const
Returns true if this is a valid CParamNode, false if it represents a non-existent node...
Definition: ParamNode.cpp:261
const CStrIntern ToUTF8Intern() const
Returns the content of this node as an internalized 8-bit string.
Definition: ParamNode.cpp:276
void ApplyLayer(const XMBData &xmb, const XMBElement &element, const wchar_t *sourceIdentifier=NULL)
Overlays the specified data onto this node.
Definition: ParamNode.cpp:69
u32 m_Index
Definition: ParamNode.h:273
bool ToBool() const
Parses the content of this node as a boolean ("true" == true, anything else == false) ...
Definition: ParamNode.cpp:296
std::shared_ptr< JS::PersistentRootedValue > m_ScriptVal
Caches the ToJSVal script representation of this node.
Definition: ParamNode.h:298
std::string m_Name
Definition: ParamNode.h:272
void ConstructJSVal(const ScriptRequest &rq, JS::MutableHandleValue ret) const
Definition: ParamNode.cpp:387
Spidermonkey maintains some 'local' state via the JSContext* object.
Definition: ScriptRequest.h:59
def xml
Definition: tests.py:121
std::map< std::string, CParamNode > ChildrenMap
Definition: ParamNode.h:153
const CParamNode & GetChild(const char *name) const
Returns the (unique) child node with the given name, or a node with IsOk() == false if there is none...
Definition: ParamNode.cpp:253
static std::string EscapeXMLString(const std::string &str)
Escapes a string so that it is well-formed XML content/attribute text.
Definition: ParamNode.cpp:309