summaryrefslogtreecommitdiffstats
path: root/sigscript/CoinListItemWrapper.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-24 16:33:13 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-24 16:33:13 -0500
commitfd874f8a1e413b769245aa61a866bd536a551c3c (patch)
treeaf66c155cc313e9ca777ba8a332c1133a52b3d9c /sigscript/CoinListItemWrapper.cpp
parenteb7d51f42aa1790be6b496a0e1882d6a9646e1c8 (diff)
downloadsigen-fd874f8a1e413b769245aa61a866bd536a551c3c.tar.gz
sigen-fd874f8a1e413b769245aa61a866bd536a551c3c.tar.xz
sigen-fd874f8a1e413b769245aa61a866bd536a551c3c.zip
Fixed up sigscript namespacing in sources
Diffstat (limited to 'sigscript/CoinListItemWrapper.cpp')
-rw-r--r--sigscript/CoinListItemWrapper.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/sigscript/CoinListItemWrapper.cpp b/sigscript/CoinListItemWrapper.cpp
index 70faa97b..41034213 100644
--- a/sigscript/CoinListItemWrapper.cpp
+++ b/sigscript/CoinListItemWrapper.cpp
@@ -22,7 +22,10 @@
#include "CoinListWrapper.h"
#include "GameWrapper.h"
-Sigscript::CoinListItemWrapper* Sigscript::CoinListItemWrapper::create(const Sigmod::CoinListItem* object, CoinListWrapper* parent)
+using namespace Sigmod;
+using namespace Sigscript;
+
+CoinListItemWrapper* CoinListItemWrapper::create(const CoinListItem* object, CoinListWrapper* parent)
{
Signature sig = Signature(parent, Subsignature(object->className(), object->id()));
if (!m_instances.contains(sig))
@@ -30,41 +33,41 @@ Sigscript::CoinListItemWrapper* Sigscript::CoinListItemWrapper::create(const Sig
return qobject_cast<CoinListItemWrapper*>(m_instances[sig]);
}
-Sigscript::CoinListItemWrapper::CoinListItemWrapper(const Sigmod::CoinListItem* object, CoinListWrapper* parent) :
+CoinListItemWrapper::CoinListItemWrapper(const CoinListItem* object, CoinListWrapper* parent) :
ObjectWrapper(object, parent),
m_object(object)
{
}
-Sigmod::CoinListItem::Type Sigscript::CoinListItemWrapper::type(const QString& name) const
+CoinListItem::Type CoinListItemWrapper::type(const QString& name) const
{
if (name == "Item")
- return Sigmod::CoinListItem::Item;
+ return CoinListItem::Item;
else if (name == "Species")
- return Sigmod::CoinListItem::Species;
- return QVariant(-1).value<Sigmod::CoinListItem::Type>();
+ return CoinListItem::Species;
+ return QVariant(-1).value<CoinListItem::Type>();
}
-Sigmod::CoinListItem::Type Sigscript::CoinListItemWrapper::type() const
+CoinListItem::Type CoinListItemWrapper::type() const
{
return m_object->type();
}
-Sigscript::ItemWrapper* Sigscript::CoinListItemWrapper::itemObject()
+ItemWrapper* CoinListItemWrapper::itemObject()
{
- if (m_object->type() == Sigmod::CoinListItem::Item)
+ if (m_object->type() == CoinListItem::Item)
return game()->item(m_object->object());
return NULL;
}
-Sigscript::SpeciesWrapper* Sigscript::CoinListItemWrapper::speciesObject()
+SpeciesWrapper* CoinListItemWrapper::speciesObject()
{
- if (m_object->type() == Sigmod::CoinListItem::Species)
+ if (m_object->type() == CoinListItem::Species)
return game()->species(m_object->object());
return NULL;
}
-int Sigscript::CoinListItemWrapper::cost() const
+int CoinListItemWrapper::cost() const
{
ALLOW_OVERRIDE_SO(object, int, cost);
return m_object->cost();