mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2026-07-27 19:07:12 +02:00
Migrated the XML module to C++ exceptions as well.
Also enabled the latest C++ revision in the project. Various other fixes and improvements.
This commit is contained in:
+16
-3
@@ -33,7 +33,7 @@ protected:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Validate the document reference and throw an error if invalid.
|
||||
*/
|
||||
bool Validate() const;
|
||||
void Validate() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -100,6 +100,11 @@ public:
|
||||
return m_Node.value();
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Used by the script engine to retrieve the name from instances of this type.
|
||||
*/
|
||||
static SQInteger Typename(HSQUIRRELVM vm);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* See whether this instance references a valid xml document.
|
||||
*/
|
||||
@@ -159,7 +164,11 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve node name.
|
||||
*/
|
||||
void SetName(CSStr name);
|
||||
void SetName(CSStr name)
|
||||
{
|
||||
if (!m_Node.set_name(name))
|
||||
SqThrowF("Unable to set XML node name");
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the node name.
|
||||
@@ -180,7 +189,11 @@ public:
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve node value.
|
||||
*/
|
||||
void SetValue(CSStr name);
|
||||
void SetValue(CSStr name)
|
||||
{
|
||||
if (!m_Node.set_value(name))
|
||||
SqThrowF("Unable to set XML node value");
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the node value.
|
||||
|
||||
Reference in New Issue
Block a user