summaryrefslogtreecommitdiffstats
path: root/pokemod/MapWildList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemod/MapWildList.cpp')
-rw-r--r--pokemod/MapWildList.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp
index b2264365..d08c84ce 100644
--- a/pokemod/MapWildList.cpp
+++ b/pokemod/MapWildList.cpp
@@ -25,36 +25,36 @@
// Qt includes
#include <QSet>
-MapWildList::MapWildList(const MapWildList& wildList) :
+Pokemod::MapWildList::MapWildList(const MapWildList& wildList) :
Object("MapWildList", wildList.parent(), wildList.id())
{
*this = wildList;
}
-MapWildList::MapWildList(const Map* parent, const int id) :
+Pokemod::MapWildList::MapWildList(const Map* parent, const int id) :
Object("MapWildList", parent, id),
m_name("")
{
}
-MapWildList::MapWildList(const MapWildList& wildList, const Map* parent, const int id) :
+Pokemod::MapWildList::MapWildList(const MapWildList& wildList, const Map* parent, const int id) :
Object("MapWildList", parent, id)
{
*this = wildList;
}
-MapWildList::MapWildList(const QDomElement& xml, const Map* parent, const int id) :
+Pokemod::MapWildList::MapWildList(const QDomElement& xml, const Map* parent, const int id) :
Object("MapWildList", parent, id)
{
load(xml, id);
}
-MapWildList::~MapWildList()
+Pokemod::MapWildList::~MapWildList()
{
clear();
}
-void MapWildList::validate()
+void Pokemod::MapWildList::validate()
{
if (m_name.isEmpty())
emit(error("Name is empty"));
@@ -70,14 +70,14 @@ void MapWildList::validate()
}
}
-void MapWildList::load(const QDomElement& xml, int id)
+void Pokemod::MapWildList::load(const QDomElement& xml, int id)
{
LOAD_ID();
LOAD(QString, name);
LOAD_SUB(newEncounter, MapWildListEncounter);
}
-QDomElement MapWildList::save() const
+QDomElement Pokemod::MapWildList::save() const
{
SAVE_CREATE();
SAVE(QString, name);
@@ -85,39 +85,39 @@ QDomElement MapWildList::save() const
return xml;
}
-void MapWildList::setName(const QString& name)
+void Pokemod::MapWildList::setName(const QString& name)
{
CHECK(name);
}
-QString MapWildList::name() const
+QString Pokemod::MapWildList::name() const
{
return m_name;
}
-const MapWildListEncounter* MapWildList::encounter(const int index) const
+const Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounter(const int index) const
{
Q_ASSERT(index < encounterCount());
return m_encounters.at(index);
}
-MapWildListEncounter* MapWildList::encounter(const int index)
+Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounter(const int index)
{
Q_ASSERT(index < encounterCount());
return m_encounters[index];
}
-const MapWildListEncounter* MapWildList::encounterById(const int id) const
+const Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounterById(const int id) const
{
return encounter(encounterIndex(id));
}
-MapWildListEncounter* MapWildList::encounterById(const int id)
+Pokemod::MapWildListEncounter* Pokemod::MapWildList::encounterById(const int id)
{
return encounter(encounterIndex(id));
}
-int MapWildList::encounterIndex(const int id) const
+int Pokemod::MapWildList::encounterIndex(const int id) const
{
for (int i = 0; i < encounterCount(); ++i)
{
@@ -127,45 +127,45 @@ int MapWildList::encounterIndex(const int id) const
return INT_MAX;
}
-int MapWildList::encounterCount() const
+int Pokemod::MapWildList::encounterCount() const
{
return m_encounters.size();
}
-MapWildListEncounter* MapWildList::newEncounter()
+Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter()
{
return newEncounter(new MapWildListEncounter(this, newEncounterId()));
}
-MapWildListEncounter* MapWildList::newEncounter(const QDomElement& xml)
+Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter(const QDomElement& xml)
{
return newEncounter(new MapWildListEncounter(xml, this, newEncounterId()));
}
-MapWildListEncounter* MapWildList::newEncounter(const MapWildListEncounter& encounter)
+Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter(const MapWildListEncounter& encounter)
{
return newEncounter(new MapWildListEncounter(encounter, this, newEncounterId()));
}
-MapWildListEncounter* MapWildList::newEncounter(MapWildListEncounter* encounter)
+Pokemod::MapWildListEncounter* Pokemod::MapWildList::newEncounter(MapWildListEncounter* encounter)
{
m_encounters.append(encounter);
return encounter;
}
-void MapWildList::deleteEncounter(const int index)
+void Pokemod::MapWildList::deleteEncounter(const int index)
{
Q_ASSERT(index < encounterCount());
delete m_encounters[index];
m_encounters.removeAt(index);
}
-void MapWildList::deleteEncounterById(const int id)
+void Pokemod::MapWildList::deleteEncounterById(const int id)
{
deleteEncounter(encounterIndex(id));
}
-int MapWildList::newEncounterId() const
+int Pokemod::MapWildList::newEncounterId() const
{
int i = 0;
while ((i < encounterCount()) && (encounterIndex(i) != INT_MAX))
@@ -173,7 +173,7 @@ int MapWildList::newEncounterId() const
return i;
}
-MapWildList& MapWildList::operator=(const MapWildList& rhs)
+Pokemod::MapWildList& Pokemod::MapWildList::operator=(const MapWildList& rhs)
{
if (this == &rhs)
return *this;
@@ -183,7 +183,7 @@ MapWildList& MapWildList::operator=(const MapWildList& rhs)
return *this;
}
-void MapWildList::clear()
+void Pokemod::MapWildList::clear()
{
while (encounterCount())
deleteEncounter(0);