summaryrefslogtreecommitdiffstats
path: root/sigmod/CoinListObject.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-12-07 01:03:48 -0500
committerBen Boeckel <MathStuf@gmail.com>2008-12-07 01:03:48 -0500
commit7459a5a34a5bcf7011c4164e3c92c7770da09514 (patch)
tree57c53a9fad0dbff587bc8249ec2e0d09308f5f7a /sigmod/CoinListObject.cpp
parent67aefdbacc16395bda2a8bfb14004190ced25e00 (diff)
downloadsigen-7459a5a34a5bcf7011c4164e3c92c7770da09514.tar.gz
sigen-7459a5a34a5bcf7011c4164e3c92c7770da09514.tar.xz
sigen-7459a5a34a5bcf7011c4164e3c92c7770da09514.zip
Renamed CoinListObject to CoinListItem and added documentation for it
Diffstat (limited to 'sigmod/CoinListObject.cpp')
-rw-r--r--sigmod/CoinListObject.cpp120
1 files changed, 0 insertions, 120 deletions
diff --git a/sigmod/CoinListObject.cpp b/sigmod/CoinListObject.cpp
deleted file mode 100644
index 2cd944ae..00000000
--- a/sigmod/CoinListObject.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright 2007-2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-// Header include
-#include "CoinListObject.h"
-
-// Sigmod includes
-#include "CoinList.h"
-#include "Macros.h"
-#include "Sigmod.h"
-
-const QStringList Sigmod::CoinListObject::TypeStr = QStringList() << "Item" << "Team Member";
-
-Sigmod::CoinListObject::CoinListObject(const CoinListObject& object) :
- Object(object.parent(), object.id())
-{
- *this = object;
-}
-
-Sigmod::CoinListObject::CoinListObject(const CoinList* parent, const int id) :
- Object(parent, id),
- m_type(Item),
- m_object(INT_MAX),
- m_cost(0)
-{
-}
-
-Sigmod::CoinListObject::CoinListObject(const CoinListObject& object, const CoinList* parent, const int id) :
- Object(parent, id)
-{
- *this = object;
-}
-
-Sigmod::CoinListObject::CoinListObject(const QDomElement& xml, const CoinList* parent, const int id) :
- Object(parent, id)
-{
- LOAD_ID();
- load(xml);
-}
-
-void Sigmod::CoinListObject::validate()
-{
- TEST_BEGIN();
- TEST(setObject, object);
- TEST_END();
-}
-
-void Sigmod::CoinListObject::load(const QDomElement& xml)
-{
- LOAD_BEGIN();
- LOAD(type);
- LOAD(object);
- LOAD(cost);
-}
-
-QDomElement Sigmod::CoinListObject::save() const
-{
- SAVE_CREATE();
- SAVE(type);
- SAVE(object);
- SAVE(cost);
- return xml;
-}
-
-void Sigmod::CoinListObject::setType(const Type type)
-{
- CHECK(type);
-}
-
-void Sigmod::CoinListObject::setObject(const int object)
-{
- if (((Item == m_type) && !sigmod()->itemById(object)) || ((Species == m_type) && !sigmod()->speciesById(object)))
- emit(error(bounds("object")));
- else
- CHECK(object);
-}
-
-void Sigmod::CoinListObject::setCost(const int cost)
-{
- CHECK(cost);
-}
-
-Sigmod::CoinListObject::Type Sigmod::CoinListObject::type() const
-{
- return m_type;
-}
-
-int Sigmod::CoinListObject::object() const
-{
- return m_object;
-}
-
-int Sigmod::CoinListObject::cost() const
-{
- return m_cost;
-}
-
-Sigmod::CoinListObject& Sigmod::CoinListObject::operator=(const CoinListObject& rhs)
-{
- if (this == &rhs)
- return *this;
- COPY(type);
- COPY(object);
- COPY(cost);
- return *this;
-}