summaryrefslogtreecommitdiffstats
path: root/sigmod/Object.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-10-06 18:10:45 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-10-06 18:10:45 +0000
commit3a096bed018254f9d662f9ae85792b8ae5df4837 (patch)
treeb7504fd5a332a220a3ce73d035496d562545f50e /sigmod/Object.cpp
parent2c0a3866e09140d8d5ff84178decddc22db15778 (diff)
[FIX] Started documenting Sigmod
[FIX] A few minor bugs git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@272 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'sigmod/Object.cpp')
-rw-r--r--sigmod/Object.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/sigmod/Object.cpp b/sigmod/Object.cpp
index 803dadc5..74065fd7 100644
--- a/sigmod/Object.cpp
+++ b/sigmod/Object.cpp
@@ -15,19 +15,16 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * \file sigmod/Object.cpp
+ */
+
// Header include
#include "Object.h"
// Sigmod includes
#include "Macros.h"
-Sigmod::Object::Object(const Object& object) :
- QObject(NULL),
- m_id(object.id()),
- m_parent(object.parent())
-{
-}
-
Sigmod::Object::Object(const Object* parent, const int id) :
QObject(NULL),
m_id(id),
@@ -40,11 +37,11 @@ const Sigmod::Object* Sigmod::Object::parent() const
return m_parent;
}
-const Sigmod::Object* Sigmod::Object::sigmod() const
+const Sigmod::Sigmod* Sigmod::Object::sigmod() const
{
if (m_parent)
return m_parent->sigmod();
- return this;
+ return qobject_cast<const Sigmod*>(this);
}
int Sigmod::Object::id() const
@@ -57,11 +54,6 @@ void Sigmod::Object::setId(const int id)
CHECK(id);
}
-QString Sigmod::Object::className() const
-{
- return QString(metaObject()->className()).section(':', -1);
-}
-
QDomDocument Sigmod::Object::xml(const Object* object)
{
QDomDocument xml(object->className());
@@ -69,6 +61,15 @@ QDomDocument Sigmod::Object::xml(const Object* object)
return xml;
}
+void Sigmod::Object::validateScript(const Script& script)
+{
+}
+
+QString Sigmod::Object::className() const
+{
+ return QString(metaObject()->className()).section(':', -1);
+}
+
QString Sigmod::Object::unused(const QString& variable)
{
return QString("Setting unused variable %1").arg(variable);