diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-04-27 15:15:17 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-04-27 15:15:17 +0000 |
| commit | 807071d35159de0660f9df31c48d5bf895ca3622 (patch) | |
| tree | a1e9dbdc1e58b91cd2e4a5e472597b0204ccb41d /pokemod/EggGroup.cpp | |
| parent | f444f5a45e9325644a360f656176d47d7f540f52 (diff) | |
[FIX] Pokemod objects now know about parents
[FIX] Project includes are now relative
[FIX] Headers included for better detection of invalid headers
[FIX] Validation code commented out so it can be done better
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@111 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/EggGroup.cpp')
| -rw-r--r-- | pokemod/EggGroup.cpp | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/pokemod/EggGroup.cpp b/pokemod/EggGroup.cpp index 5e9fe519..3d8562b3 100644 --- a/pokemod/EggGroup.cpp +++ b/pokemod/EggGroup.cpp @@ -22,39 +22,40 @@ #include "EggGroup.h" EggGroup::EggGroup(const EggGroup& eggGroup) : - Object("EggGroup", eggGroup.pokemod(), eggGroup.id()) + Object("EggGroup", eggGroup.parent(), eggGroup.id()) { *this = eggGroup; } -EggGroup::EggGroup(const Pokemod* pokemod, const int id) : - Object("EggGroup", pokemod, id), +EggGroup::EggGroup(const Object* parent, const int id) : + Object("EggGroup", parent, id), m_name("") { } -EggGroup::EggGroup(const EggGroup& eggGroup, const Pokemod* pokemod, const int id) : - Object("EggGroup", pokemod, id) +EggGroup::EggGroup(const EggGroup& eggGroup, const Object* parent, const int id) : + Object("EggGroup", parent, id) { *this = eggGroup; } -EggGroup::EggGroup(const QDomElement& xml, const Pokemod* pokemod, const int id) : - Object("EggGroup", pokemod, id) +EggGroup::EggGroup(const QDomElement& xml, const Object* parent, const int id) : + Object("EggGroup", parent, id) { load(xml, id); } bool EggGroup::validate() const { - bool valid = true; - pokemod()->validationMsg(QString("---Egg Group \"%1\" with id %2---").arg(m_name).arg(id()), Pokemod::V_Msg); - if (m_name == "") - { - pokemod()->validationMsg("Name is not defined"); - valid = false; - } - return valid; + // TODO: validate +// bool valid = true; +// static_cast<const Pokemod*>(pokemod())->validationMsg(QString("---Egg Group \"%1\" with id %2---").arg(m_name).arg(id()), Pokemod::V_Msg); +// if (m_name == "") +// { +// static_cast<const Pokemod*>(pokemod())->validationMsg("Name is not defined"); +// valid = false; +// } +// return valid; } void EggGroup::load(const QDomElement& xml, int id) |
