summaryrefslogtreecommitdiffstats
path: root/pokemod/Ability.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-21 17:13:11 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-21 17:13:11 +0000
commita1fff27395d1930820e6c007fdedd8e9dc58f0b3 (patch)
treef61c6b86b4a415fdc2bd0f7d6ca9bfdbfd8e8b64 /pokemod/Ability.cpp
parent342fa6879e9fd8a757ebabe0a30370137b8d83a7 (diff)
downloadsigen-a1fff27395d1930820e6c007fdedd8e9dc58f0b3.tar.gz
sigen-a1fff27395d1930820e6c007fdedd8e9dc58f0b3.tar.xz
sigen-a1fff27395d1930820e6c007fdedd8e9dc58f0b3.zip
[FIX] PokeMod namespace removed
[ADD] MoveEffect editing form for PokéModr git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@38 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/Ability.cpp')
-rw-r--r--pokemod/Ability.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/pokemod/Ability.cpp b/pokemod/Ability.cpp
index 2e29d76e..9e8b89bd 100644
--- a/pokemod/Ability.cpp
+++ b/pokemod/Ability.cpp
@@ -30,25 +30,25 @@
#include "Pokemod.h"
#include "Ability.h"
-PokeMod::Ability::Ability(const Pokemod& par, const unsigned _id) :
+Ability::Ability(const Pokemod& par, const unsigned _id) :
Object(par, _id),
name("")
{
}
-PokeMod::Ability::Ability(const Pokemod& par, const Ability& a, const unsigned _id) :
+Ability::Ability(const Pokemod& par, const Ability& a, const unsigned _id) :
Object(par, _id)
{
*this = a;
}
-PokeMod::Ability::Ability(const Pokemod& par, const QString& fname, const unsigned _id) :
+Ability::Ability(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id)
{
load(fname, _id);
}
-bool PokeMod::Ability::validate() const
+bool Ability::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("---Ability \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg);
@@ -83,7 +83,7 @@ bool PokeMod::Ability::validate() const
return valid;
}
-unsigned PokeMod::Ability::getNewId() const
+unsigned Ability::getNewId() const
{
unsigned i = 0;
for (; (i < getEffectCount()) && (getEffectIndex(i) != UINT_MAX); ++i)
@@ -91,7 +91,7 @@ unsigned PokeMod::Ability::getNewId() const
return i;
}
-void PokeMod::Ability::load(const QString& fname, const unsigned _id) throw(Exception)
+void Ability::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -110,7 +110,7 @@ void PokeMod::Ability::load(const QString& fname, const unsigned _id) throw(Exce
}
}
-void PokeMod::Ability::save() const throw(Exception)
+void Ability::save() const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -120,41 +120,41 @@ void PokeMod::Ability::save() const throw(Exception)
i.next().save(name);
}
-void PokeMod::Ability::setName(const QString& n)
+void Ability::setName(const QString& n)
{
name = n;
}
-QString PokeMod::Ability::getName() const
+QString Ability::getName() const
{
return name;
}
-const PokeMod::AbilityEffect& PokeMod::Ability::getEffect(const unsigned i) const throw(IndexException)
+const AbilityEffect& Ability::getEffect(const unsigned i) const throw(IndexException)
{
if (getEffectCount() <= i)
throw(IndexException("Ability"));
return effects.at(i);
}
-PokeMod::AbilityEffect& PokeMod::Ability::getEffect(const unsigned i) throw(IndexException)
+AbilityEffect& Ability::getEffect(const unsigned i) throw(IndexException)
{
if (getEffectCount() <= i)
throw(IndexException("Ability"));
return effects[i];
}
-const PokeMod::AbilityEffect& PokeMod::Ability::getEffectByID(const unsigned i) const throw(IndexException)
+const AbilityEffect& Ability::getEffectByID(const unsigned i) const throw(IndexException)
{
return getEffect(getEffectIndex(i));
}
-PokeMod::AbilityEffect& PokeMod::Ability::getEffectByID(const unsigned i) throw(IndexException)
+AbilityEffect& Ability::getEffectByID(const unsigned i) throw(IndexException)
{
return getEffect(getEffectIndex(i));
}
-unsigned PokeMod::Ability::getEffectIndex(const unsigned _id) const
+unsigned Ability::getEffectIndex(const unsigned _id) const
{
for (unsigned i = 0; i < getEffectCount(); ++i)
{
@@ -164,37 +164,37 @@ unsigned PokeMod::Ability::getEffectIndex(const unsigned _id) const
return UINT_MAX;
}
-unsigned PokeMod::Ability::getEffectCount() const
+unsigned Ability::getEffectCount() const
{
return effects.size();
}
-PokeMod::AbilityEffect& PokeMod::Ability::newEffect()
+AbilityEffect& Ability::newEffect()
{
effects.append(AbilityEffect(pokemod, getNewId()));
return effects[getEffectCount() - 1];
}
-PokeMod::AbilityEffect& PokeMod::Ability::newEffect(const QString& fname)
+AbilityEffect& Ability::newEffect(const QString& fname)
{
effects.append(AbilityEffect(pokemod, fname, getNewId()));
return effects[getEffectCount() - 1];
}
-PokeMod::AbilityEffect& PokeMod::Ability::newEffect(const AbilityEffect& e)
+AbilityEffect& Ability::newEffect(const AbilityEffect& e)
{
effects.append(AbilityEffect(pokemod, e, getNewId()));
return effects[getEffectCount() - 1];
}
-void PokeMod::Ability::deleteEffect(const unsigned i) throw(IndexException)
+void Ability::deleteEffect(const unsigned i) throw(IndexException)
{
if (getEffectCount() <= i)
throw(IndexException("Ability"));
effects.removeAt(i);
}
-PokeMod::Ability& PokeMod::Ability::operator=(const Ability& rhs)
+Ability& Ability::operator=(const Ability& rhs)
{
if (this == &rhs)
return *this;