18 #ifndef INCLUDED_PARAMNODE 19 #define INCLUDED_PARAMNODE 199 const std::wstring&
ToString()
const;
204 const std::string
ToUTF8()
const;
235 std::wstring
ToXML()
const;
240 void ToXML(std::wostream& strm)
const;
251 void ToJSVal(JSContext* cx,
bool cacheValue, JS::MutableHandleValue ret)
const;
278 void ConstructJSVal(JSContext* cx, JS::MutableHandleValue ret)
const;
290 #endif // INCLUDED_PARAMNODE An entity initialisation parameter node.
Definition: ParamNode.h:148
CParamNode(bool isOk=true)
Constructs a new, empty node.
Definition: ParamNode.cpp:35
A simple fixed-point number class.
Definition: Fixed.h:115
bool ToBool() const
Parses the content of this node as a boolean ("true" == true, anything else == false) ...
Definition: ParamNode.cpp:275
void ApplyLayer(const XMBFile &xmb, const XMBElement &element, const wchar_t *sourceIdentifier=NULL)
Overlays the specified data onto this node.
Definition: ParamNode.cpp:67
xml
Definition: tests.py:119
static std::wstring EscapeXMLString(const std::wstring &str)
Escapes a string so that it is well-formed XML content/attribute text.
Definition: ParamNode.cpp:288
const std::wstring & ToString() const
Returns the content of this node as a string.
Definition: ParamNode.cpp:237
const std::string ToUTF8() const
Returns the content of this node as an 8-bit string.
Definition: ParamNode.cpp:242
bool IsOk() const
Returns true if this is a valid CParamNode, false if it represents a non-existent node...
Definition: ParamNode.cpp:232
int ToInt() const
Parses the content of this node as an integer.
Definition: ParamNode.cpp:252
Definition: XeroXMB.h:160
const ChildrenMap & GetChildren() const
Returns the names/nodes of the children of this node, ordered by name.
Definition: ParamNode.cpp:283
void ConstructJSVal(JSContext *cx, JS::MutableHandleValue ret) const
Definition: ParamNode.cpp:369
bool m_IsOk
Definition: ParamNode.h:282
void ResetScriptVal()
Definition: ParamNode.cpp:436
fixed ToFixed() const
Parses the content of this node as a fixed-point number.
Definition: ParamNode.cpp:261
static void LoadXML(CParamNode &ret, const XMBFile &file, const wchar_t *sourceIdentifier=NULL)
Loads the XML data specified by file into the node ret.
Definition: ParamNode.cpp:40
ChildrenMap m_Childs
Definition: ParamNode.h:281
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:224
Interned 8-bit strings.
Definition: CStrIntern.h:37
u32 PSRETURN
Definition: Errors.h:75
float ToFloat() const
Parses the content of this node as a floating-point number.
Definition: ParamNode.cpp:266
static PSRETURN LoadXMLString(CParamNode &ret, const char *xml, const wchar_t *sourceIdentifier=NULL)
See LoadXML, but parses the XML string xml.
Definition: ParamNode.cpp:55
std::wstring m_Value
Definition: ParamNode.h:280
void ToJSVal(JSContext *cx, bool cacheValue, JS::MutableHandleValue ret) const
Returns a jsval representation of this node and its children.
Definition: ParamNode.cpp:355
Definition: XeroXMB.h:115
std::shared_ptr< JS::PersistentRootedValue > m_ScriptVal
Caches the ToJSVal script representation of this node.
Definition: ParamNode.h:287
const CStrIntern ToUTF8Intern() const
Returns the content of this node as an internalized 8-bit string.
Definition: ParamNode.cpp:247
std::wstring ToXML() const
Returns the content of this node and its children as an XML string.
Definition: ParamNode.cpp:314
std::map< std::string, CParamNode > ChildrenMap
Definition: ParamNode.h:151