mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Reuse method.
This commit is contained in:
parent
da139c6a81
commit
7e39fab21a
@ -263,7 +263,7 @@ void Register_XML(HSQUIRRELVM vm)
|
|||||||
.Prop(_SC("Next"), &XmlAttribute::NextAttribute)
|
.Prop(_SC("Next"), &XmlAttribute::NextAttribute)
|
||||||
.Prop(_SC("Prev"), &XmlAttribute::PrevAttribute)
|
.Prop(_SC("Prev"), &XmlAttribute::PrevAttribute)
|
||||||
// Member Methods
|
// Member Methods
|
||||||
.Func(_SC("SetName"), &XmlAttribute::ApplyName)
|
.Func(_SC("SetName"), &XmlAttribute::SetName)
|
||||||
.Func(_SC("SetValue"), &XmlAttribute::ApplyValue)
|
.Func(_SC("SetValue"), &XmlAttribute::ApplyValue)
|
||||||
.Func(_SC("AsString"), &XmlAttribute::AsString)
|
.Func(_SC("AsString"), &XmlAttribute::AsString)
|
||||||
.Func(_SC("AsInt"), &XmlAttribute::AsInt)
|
.Func(_SC("AsInt"), &XmlAttribute::AsInt)
|
||||||
@ -354,7 +354,7 @@ void Register_XML(HSQUIRRELVM vm)
|
|||||||
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer1)
|
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer1)
|
||||||
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer2)
|
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer2)
|
||||||
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer3)
|
.Overload(_SC("AppendBuffer"), &XmlNode::AppendBuffer3)
|
||||||
.Func(_SC("SetName"), &XmlNode::ApplyName)
|
.Func(_SC("SetName"), &XmlNode::SetName)
|
||||||
.Func(_SC("SetValue"), &XmlNode::ApplyValue)
|
.Func(_SC("SetValue"), &XmlNode::ApplyValue)
|
||||||
.Func(_SC("GetChild"), &XmlNode::Child)
|
.Func(_SC("GetChild"), &XmlNode::Child)
|
||||||
.Func(_SC("GetAttr"), &XmlNode::GetAttribute)
|
.Func(_SC("GetAttr"), &XmlNode::GetAttribute)
|
||||||
|
@ -781,19 +781,11 @@ public:
|
|||||||
{
|
{
|
||||||
if (!m_Node.set_name(name.mPtr))
|
if (!m_Node.set_name(name.mPtr))
|
||||||
{
|
{
|
||||||
STHROWF("Unable to set XML node name");
|
STHROWF("Unable to set XML node name `{s}`", name.ToStr());
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
|
||||||
* Modify the node name.
|
|
||||||
*/
|
|
||||||
bool ApplyName(StackStrF & name)
|
|
||||||
{
|
|
||||||
return m_Node.set_name(name.mPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Retrieve node value.
|
* Retrieve node value.
|
||||||
*/
|
*/
|
||||||
@ -1337,19 +1329,11 @@ public:
|
|||||||
{
|
{
|
||||||
if (!m_Attr.set_name(name.mPtr))
|
if (!m_Attr.set_name(name.mPtr))
|
||||||
{
|
{
|
||||||
STHROWF("Unable to set XML attribute name");
|
STHROWF("Unable to set XML attribute name `{s}`", name.ToStr());
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
|
||||||
* Modify the attribute name.
|
|
||||||
*/
|
|
||||||
bool ApplyName(StackStrF & name)
|
|
||||||
{
|
|
||||||
return m_Attr.set_name(name.mPtr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------------------------
|
||||||
* Retrieve attribute value.
|
* Retrieve attribute value.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user