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:
Sandu Liviu Catalin
2016-02-28 17:39:26 +02:00
parent 47eec5cb10
commit 3162221e7f
12 changed files with 383 additions and 229 deletions
+16 -3
View File
@@ -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.