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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user