summaryrefslogtreecommitdiffstats
path: root/pokemod/CoinList.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-01-19 01:22:22 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-01-19 01:22:22 +0000
commit342d0201b07d9030fced2f3baf3ecdefc841879a (patch)
treef0715cc7b267e2ce2bc93971d9e95c7e0c9b2b62 /pokemod/CoinList.cpp
parentd017d90324a439dfb4bd3f25d30deb672bc40fd4 (diff)
downloadsigen-342d0201b07d9030fced2f3baf3ecdefc841879a.tar.gz
sigen-342d0201b07d9030fced2f3baf3ecdefc841879a.tar.xz
sigen-342d0201b07d9030fced2f3baf3ecdefc841879a.zip
[DEL] Removed PokeGen namespace
[ADD] general/AudioCache.h completed [DEL] VERSION removed from subdir .pro files [DEL] audio/ git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@33 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/CoinList.cpp')
-rw-r--r--pokemod/CoinList.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/pokemod/CoinList.cpp b/pokemod/CoinList.cpp
index 8a8b2a0e..c4ca7f98 100644
--- a/pokemod/CoinList.cpp
+++ b/pokemod/CoinList.cpp
@@ -23,26 +23,26 @@
#include "CoinList.h"
-PokeGen::PokeMod::CoinList::CoinList(const Pokemod& par, const unsigned _id) :
+PokeMod::CoinList::CoinList(const Pokemod& par, const unsigned _id) :
Object(par, _id),
name(""),
value(0)
{
}
-PokeGen::PokeMod::CoinList::CoinList(const Pokemod& par, const CoinList& c, const unsigned _id) :
+PokeMod::CoinList::CoinList(const Pokemod& par, const CoinList& c, const unsigned _id) :
Object(par, _id)
{
*this = c;
}
-PokeGen::PokeMod::CoinList::CoinList(const Pokemod& par, const QString& fname, const unsigned _id) :
+PokeMod::CoinList::CoinList(const Pokemod& par, const QString& fname, const unsigned _id) :
Object(par, _id)
{
load(fname, _id);
}
-bool PokeGen::PokeMod::CoinList::validate() const
+bool PokeMod::CoinList::validate() const
{
bool valid = true;
pokemod.validationMsg(QString("---Coin List \"%1\" with id %2---").arg(name).arg(id), Pokemod::V_Msg);
@@ -113,7 +113,7 @@ bool PokeGen::PokeMod::CoinList::validate() const
return valid;
}
-unsigned PokeGen::PokeMod::CoinList::getNewId() const
+unsigned PokeMod::CoinList::getNewId() const
{
unsigned i = 0;
for (; (i < getItemCount()) && (getItemByID(i) != UINT_MAX); ++i)
@@ -121,7 +121,7 @@ unsigned PokeGen::PokeMod::CoinList::getNewId() const
return i;
}
-void PokeGen::PokeMod::CoinList::load(const QString& fname, const unsigned _id) throw(Exception)
+void PokeMod::CoinList::load(const QString& fname, const unsigned _id) throw(Exception)
{
Ini ini(fname);
if (_id == UINT_MAX)
@@ -141,7 +141,7 @@ void PokeGen::PokeMod::CoinList::load(const QString& fname, const unsigned _id)
}
}
-void PokeGen::PokeMod::CoinList::save() const throw(Exception)
+void PokeMod::CoinList::save() const throw(Exception)
{
Ini ini;
ini.addField("id", id);
@@ -152,12 +152,12 @@ void PokeGen::PokeMod::CoinList::save() const throw(Exception)
i.next().save(name);
}
-void PokeGen::PokeMod::CoinList::setName(const QString& n)
+void PokeMod::CoinList::setName(const QString& n)
{
name = n;
}
-void PokeGen::PokeMod::CoinList::setValue(const unsigned v) throw(Exception)
+void PokeMod::CoinList::setValue(const unsigned v) throw(Exception)
{
for (unsigned i = 0; (i < pokemod.getItemCount()); ++i)
{
@@ -173,31 +173,31 @@ void PokeGen::PokeMod::CoinList::setValue(const unsigned v) throw(Exception)
throw(Exception("CoinList", "no compatable coin cases"));
}
-QString PokeGen::PokeMod::CoinList::getName() const
+QString PokeMod::CoinList::getName() const
{
return name;
}
-unsigned PokeGen::PokeMod::CoinList::getValue() const
+unsigned PokeMod::CoinList::getValue() const
{
return value;
}
-const PokeGen::PokeMod::CoinListObject& PokeGen::PokeMod::CoinList::getItem(const unsigned i) const throw(IndexException)
+const PokeMod::CoinListObject& PokeMod::CoinList::getItem(const unsigned i) const throw(IndexException)
{
if (getItemCount() <= i)
throw(IndexException("CoinList"));
return items.at(i);
}
-PokeGen::PokeMod::CoinListObject& PokeGen::PokeMod::CoinList::getItem(const unsigned i) throw(IndexException)
+PokeMod::CoinListObject& PokeMod::CoinList::getItem(const unsigned i) throw(IndexException)
{
if (getItemCount() <= i)
throw(IndexException("CoinList"));
return items[i];
}
-unsigned PokeGen::PokeMod::CoinList::getItemByID(const unsigned _id) const
+unsigned PokeMod::CoinList::getItemByID(const unsigned _id) const
{
for (unsigned i = 0; i < getItemCount(); ++i)
{
@@ -207,37 +207,37 @@ unsigned PokeGen::PokeMod::CoinList::getItemByID(const unsigned _id) const
return UINT_MAX;
}
-unsigned PokeGen::PokeMod::CoinList::getItemCount() const
+unsigned PokeMod::CoinList::getItemCount() const
{
return items.size();
}
-PokeGen::PokeMod::CoinListObject& PokeGen::PokeMod::CoinList::newItem()
+PokeMod::CoinListObject& PokeMod::CoinList::newItem()
{
items.append(CoinListObject(pokemod, getNewId()));
return items[getItemCount() - 1];
}
-PokeGen::PokeMod::CoinListObject& PokeGen::PokeMod::CoinList::newItem(const QString& fname)
+PokeMod::CoinListObject& PokeMod::CoinList::newItem(const QString& fname)
{
items.append(CoinListObject(pokemod, fname, getNewId()));
return items[getItemCount() - 1];
}
-PokeGen::PokeMod::CoinListObject& PokeGen::PokeMod::CoinList::newItem(const CoinListObject& o)
+PokeMod::CoinListObject& PokeMod::CoinList::newItem(const CoinListObject& o)
{
items.append(CoinListObject(pokemod, o, getNewId()));
return items[getItemCount() - 1];
}
-void PokeGen::PokeMod::CoinList::deleteItem(const unsigned i) throw(IndexException)
+void PokeMod::CoinList::deleteItem(const unsigned i) throw(IndexException)
{
if (getItemCount() <= i)
throw(IndexException("CoinList"));
items.removeAt(i);
}
-PokeGen::PokeMod::CoinList& PokeGen::PokeMod::CoinList::operator=(const CoinList& rhs)
+PokeMod::CoinList& PokeMod::CoinList::operator=(const CoinList& rhs)
{
if (this == &rhs)
return *this;