18#ifndef INCLUDED_PARAMNODE
19#define INCLUDED_PARAMNODE
212 const std::string&
ToString()
const;
u32 PSRETURN
Definition: Errors.h:75
A simple fixed-point number class.
Definition: Fixed.h:120
An entity initialisation parameter node.
Definition: ParamNode.h:151
std::string m_Value
Definition: ParamNode.h:291
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:374
void ConstructJSVal(const ScriptRequest &rq, JS::MutableHandleValue ret) const
Definition: ParamNode.cpp:388
const CStrIntern ToUTF8Intern() const
Returns the content of this node as an internalized 8-bit string.
Definition: ParamNode.cpp:277
const ChildrenMap & GetChildren() const
Returns the names/nodes of the children of this node, ordered by name.
Definition: ParamNode.cpp:305
std::string ToXMLString() const
Returns the content of this node and its children as an XML string.
Definition: ParamNode.cpp:335
static PSRETURN LoadXMLString(CParamNode &ret, const char *xml, const wchar_t *sourceIdentifier=NULL)
See LoadXML, but parses the XML string xml.
Definition: ParamNode.cpp:58
std::string m_Name
Definition: ParamNode.h:272
bool m_IsOk
Definition: ParamNode.h:293
static std::string EscapeXMLString(const std::string &str)
Escapes a string so that it is well-formed XML content/attribute text.
Definition: ParamNode.cpp:310
bool ToBool() const
Parses the content of this node as a boolean ("true" == true, anything else == false)
Definition: ParamNode.cpp:297
float ToFloat() const
Parses the content of this node as a floating-point number.
Definition: ParamNode.cpp:292
std::map< std::string, CParamNode > ChildrenMap
Definition: ParamNode.h:153
void ApplyLayer(const XMBData &xmb, const XMBElement &element, const wchar_t *sourceIdentifier=NULL)
Overlays the specified data onto this node.
Definition: ParamNode.cpp:70
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:254
void ResetScriptVal()
Definition: ParamNode.cpp:454
ChildrenMap m_Childs
Definition: ParamNode.h:292
const std::string & ToString() const
Returns the content of this node as an UTF8 string.
Definition: ParamNode.cpp:272
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:43
int ToInt() const
Parses the content of this node as an integer.
Definition: ParamNode.cpp:282
bool IsOk() const
Returns true if this is a valid CParamNode, false if it represents a non-existent node.
Definition: ParamNode.cpp:262
const CParamNode & GetOnlyChild() const
Returns the only child node, or a node with IsOk() == false if there is none.
Definition: ParamNode.cpp:245
CParamNode(bool isOk=true)
Constructs a new, empty node.
Definition: ParamNode.cpp:38
fixed ToFixed() const
Parses the content of this node as a fixed-point number.
Definition: ParamNode.cpp:287
std::shared_ptr< JS::PersistentRootedValue > m_ScriptVal
Caches the ToJSVal script representation of this node.
Definition: ParamNode.h:298
u32 m_Index
Definition: ParamNode.h:273
const std::wstring ToWString() const
Returns the content of this node as a wstring.
Definition: ParamNode.cpp:267
Interned 8-bit strings.
Definition: CStrIntern.h:38
Spidermonkey maintains some 'local' state via the JSContext* object.
Definition: ScriptRequest.h:60
Definition: XMBData.h:136
def xml
Definition: tests.py:138
uint32_t u32
Definition: types.h:39