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
@@ -32,7 +32,7 @@ protected:
/* --------------------------------------------------------------------------------------------
* Validate the document reference and throw an error if invalid.
*/
bool Validate() const;
void Validate() const;
private:
@@ -99,6 +99,11 @@ public:
return m_Attr.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.
*/
@@ -142,7 +147,11 @@ public:
/* --------------------------------------------------------------------------------------------
* Retrieve attribute name.
*/
void SetName(CSStr name);
void SetName(CSStr name)
{
if (!m_Attr.set_name(name))
SqThrowF("Unable to set xml attribute name");
}
/* --------------------------------------------------------------------------------------------
* Modify the attribute name.
@@ -163,7 +172,11 @@ public:
/* --------------------------------------------------------------------------------------------
* Retrieve attribute value.
*/
void SetValue(CSStr name);
void SetValue(CSStr name)
{
if (!m_Attr.set_value(name))
SqThrowF("Unable to set xml attribute value");
}
/* --------------------------------------------------------------------------------------------
* Modify the attribute value.