From 03b8241bbc25852d82e02036612283e205860b36 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Mon, 30 Jul 2012 12:08:21 -0300 Subject: [PATCH] Rename stdext::shared_object_ptr to compile in gcc 4.6 --- src/framework/core/declarations.h | 10 ++--- src/framework/graphics/declarations.h | 30 +++++++-------- src/framework/luaengine/declarations.h | 2 +- src/framework/luaengine/luabinder.h | 12 +++--- src/framework/luaengine/luavaluecasts.h | 4 +- src/framework/net/declarations.h | 10 ++--- src/framework/otml/declarations.h | 4 +- src/framework/sound/declarations.h | 12 +++--- src/framework/stdext/shared_object.h | 9 ++--- src/framework/ui/declarations.h | 18 ++++----- src/otclient/declarations.h | 50 ++++++++++++------------- src/otclient/game.cpp | 7 ++++ src/otclient/game.h | 2 +- src/otclient/item.cpp | 2 +- src/otclient/luafunctions.cpp | 5 ++- src/otclient/protocolgame.h | 2 +- src/otclient/protocolgameparse.cpp | 12 ++++-- src/otclient/protocolgamesend.cpp | 4 +- src/otclient/thingtypemanager.cpp | 2 +- src/otclient/thingtypemanager.h | 2 +- 20 files changed, 106 insertions(+), 93 deletions(-) diff --git a/src/framework/core/declarations.h b/src/framework/core/declarations.h index e6c90614..e9ff38f8 100644 --- a/src/framework/core/declarations.h +++ b/src/framework/core/declarations.h @@ -33,11 +33,11 @@ class ScheduledEvent; class FileStream; class BinaryTree; -typedef stdext::shared_object_ptr ModulePtr; -typedef stdext::shared_object_ptr EventPtr; -typedef stdext::shared_object_ptr ScheduledEventPtr; -typedef stdext::shared_object_ptr FileStreamPtr; -typedef stdext::shared_object_ptr BinaryTreePtr; +typedef boost::intrusive_ptr ModulePtr; +typedef boost::intrusive_ptr EventPtr; +typedef boost::intrusive_ptr ScheduledEventPtr; +typedef boost::intrusive_ptr FileStreamPtr; +typedef boost::intrusive_ptr BinaryTreePtr; typedef std::vector BinaryTreeVec; diff --git a/src/framework/graphics/declarations.h b/src/framework/graphics/declarations.h index 1533faf4..65b5f76a 100644 --- a/src/framework/graphics/declarations.h +++ b/src/framework/graphics/declarations.h @@ -44,21 +44,21 @@ class ParticleSystem; class ParticleEffect; class ParticleEffectType; -typedef stdext::shared_object_ptr ImagePtr; -typedef stdext::shared_object_ptr TexturePtr; -typedef stdext::shared_object_ptr AnimatedTexturePtr; -typedef stdext::shared_object_ptr BitmapFontPtr; -typedef stdext::shared_object_ptr CachedTextPtr; -typedef stdext::shared_object_ptr FrameBufferPtr; -typedef stdext::shared_object_ptr ShaderPtr; -typedef stdext::shared_object_ptr ShaderProgramPtr; -typedef stdext::shared_object_ptr PainterShaderProgramPtr; -typedef stdext::shared_object_ptr ParticlePtr; -typedef stdext::shared_object_ptr ParticleEmitterPtr; -typedef stdext::shared_object_ptr ParticleAffectorPtr; -typedef stdext::shared_object_ptr ParticleSystemPtr; -typedef stdext::shared_object_ptr ParticleEffectPtr; -typedef stdext::shared_object_ptr ParticleEffectTypePtr; +typedef boost::intrusive_ptr ImagePtr; +typedef boost::intrusive_ptr TexturePtr; +typedef boost::intrusive_ptr AnimatedTexturePtr; +typedef boost::intrusive_ptr BitmapFontPtr; +typedef boost::intrusive_ptr CachedTextPtr; +typedef boost::intrusive_ptr FrameBufferPtr; +typedef boost::intrusive_ptr ShaderPtr; +typedef boost::intrusive_ptr ShaderProgramPtr; +typedef boost::intrusive_ptr PainterShaderProgramPtr; +typedef boost::intrusive_ptr ParticlePtr; +typedef boost::intrusive_ptr ParticleEmitterPtr; +typedef boost::intrusive_ptr ParticleAffectorPtr; +typedef boost::intrusive_ptr ParticleSystemPtr; +typedef boost::intrusive_ptr ParticleEffectPtr; +typedef boost::intrusive_ptr ParticleEffectTypePtr; typedef std::vector ShaderList; #endif diff --git a/src/framework/luaengine/declarations.h b/src/framework/luaengine/declarations.h index 4b3e322b..717b210f 100644 --- a/src/framework/luaengine/declarations.h +++ b/src/framework/luaengine/declarations.h @@ -30,6 +30,6 @@ class LuaObject; typedef std::function LuaCppFunction; typedef std::unique_ptr LuaCppFunctionPtr; -typedef stdext::shared_object_ptr LuaObjectPtr; +typedef boost::intrusive_ptr LuaObjectPtr; #endif diff --git a/src/framework/luaengine/luabinder.h b/src/framework/luaengine/luabinder.h index c230743b..d3df7543 100644 --- a/src/framework/luaengine/luabinder.h +++ b/src/framework/luaengine/luabinder.h @@ -152,18 +152,18 @@ namespace luabinder /// Create member function lambdas template - std::function&, const Args&...)> make_mem_func(Ret (C::* f)(Args...)) { + std::function&, const Args&...)> make_mem_func(Ret (C::* f)(Args...)) { auto mf = std::mem_fn(f); - return [=](const stdext::shared_object_ptr& obj, const Args&... args) mutable -> Ret { + return [=](const boost::intrusive_ptr& obj, const Args&... args) mutable -> Ret { if(!obj) throw LuaException("failed to call a member function because the passed object is nil"); return mf(obj.get(), args...); }; } template - std::function&, const Args&...)> make_mem_func(void (C::* f)(Args...)) { + std::function&, const Args&...)> make_mem_func(void (C::* f)(Args...)) { auto mf = std::mem_fn(f); - return [=](const stdext::shared_object_ptr& obj, const Args&... args) mutable -> void { + return [=](const boost::intrusive_ptr& obj, const Args&... args) mutable -> void { if(!obj) throw LuaException("failed to call a member function because the passed object is nil"); mf(obj.get(), args...); @@ -186,7 +186,7 @@ namespace luabinder /// Bind member functions template LuaCppFunction bind_mem_fun(Ret (FC::* f)(Args...)) { - typedef typename std::tuple, typename remove_const_ref::type...> Tuple; + typedef typename std::tuple, typename remove_const_ref::type...> Tuple; auto lambda = make_mem_func(f); return bind_fun_specializer::type, decltype(lambda), @@ -209,7 +209,7 @@ namespace luabinder LuaCppFunction bind_mem_fun(int (C::*f)(LuaInterface*)) { auto mf = std::mem_fn(f); return [=](LuaInterface* lua) -> int { - auto obj = lua->castValue>(1); + auto obj = lua->castValue>(1); lua->remove(1); return mf(obj, lua); }; diff --git a/src/framework/luaengine/luavaluecasts.h b/src/framework/luaengine/luavaluecasts.h index d93361b8..d7e98ae4 100644 --- a/src/framework/luaengine/luavaluecasts.h +++ b/src/framework/luaengine/luavaluecasts.h @@ -111,7 +111,7 @@ bool luavalue_cast(int index, LuaObjectPtr& obj); template typename std::enable_if::value, bool>::type -luavalue_cast(int index, stdext::shared_object_ptr& ptr); +luavalue_cast(int index, boost::intrusive_ptr& ptr); // std::function template @@ -186,7 +186,7 @@ push_luavalue(const T& obj) { template typename std::enable_if::value, bool>::type -luavalue_cast(int index, stdext::shared_object_ptr& ptr) { +luavalue_cast(int index, boost::intrusive_ptr& ptr) { LuaObjectPtr obj; if(!luavalue_cast(index, obj)) return false; diff --git a/src/framework/net/declarations.h b/src/framework/net/declarations.h index e1c189ff..d4bbef67 100644 --- a/src/framework/net/declarations.h +++ b/src/framework/net/declarations.h @@ -34,10 +34,10 @@ class Connection; class Protocol; class Server; -typedef stdext::shared_object_ptr InputMessagePtr; -typedef stdext::shared_object_ptr OutputMessagePtr; -typedef stdext::shared_object_ptr ConnectionPtr; -typedef stdext::shared_object_ptr ProtocolPtr; -typedef stdext::shared_object_ptr ServerPtr; +typedef boost::intrusive_ptr InputMessagePtr; +typedef boost::intrusive_ptr OutputMessagePtr; +typedef boost::intrusive_ptr ConnectionPtr; +typedef boost::intrusive_ptr ProtocolPtr; +typedef boost::intrusive_ptr ServerPtr; #endif diff --git a/src/framework/otml/declarations.h b/src/framework/otml/declarations.h index 35de3b56..141680e9 100644 --- a/src/framework/otml/declarations.h +++ b/src/framework/otml/declarations.h @@ -30,8 +30,8 @@ class OTMLDocument; class OTMLParser; class OTMLEmitter; -typedef stdext::shared_object_ptr OTMLNodePtr; -typedef stdext::shared_object_ptr OTMLDocumentPtr; +typedef boost::intrusive_ptr OTMLNodePtr; +typedef boost::intrusive_ptr OTMLDocumentPtr; typedef std::vector OTMLNodeList; #endif diff --git a/src/framework/sound/declarations.h b/src/framework/sound/declarations.h index 251d7790..f91cb2dd 100644 --- a/src/framework/sound/declarations.h +++ b/src/framework/sound/declarations.h @@ -38,11 +38,11 @@ class StreamSoundSource; class CombinedSoundSource; class OggSoundFile; -typedef stdext::shared_object_ptr SoundSourcePtr; -typedef stdext::shared_object_ptr SoundFilePtr; -typedef stdext::shared_object_ptr SoundBufferPtr; -typedef stdext::shared_object_ptr StreamSoundSourcePtr; -typedef stdext::shared_object_ptr CombinedSoundSourcePtr; -typedef stdext::shared_object_ptr OggSoundFilePtr; +typedef boost::intrusive_ptr SoundSourcePtr; +typedef boost::intrusive_ptr SoundFilePtr; +typedef boost::intrusive_ptr SoundBufferPtr; +typedef boost::intrusive_ptr StreamSoundSourcePtr; +typedef boost::intrusive_ptr CombinedSoundSourcePtr; +typedef boost::intrusive_ptr OggSoundFilePtr; #endif diff --git a/src/framework/stdext/shared_object.h b/src/framework/stdext/shared_object.h index 54b7bee1..a18c0857 100644 --- a/src/framework/stdext/shared_object.h +++ b/src/framework/stdext/shared_object.h @@ -28,9 +28,6 @@ namespace stdext { -template -using shared_object_ptr = boost::intrusive_ptr; - class shared_object { public: @@ -44,16 +41,16 @@ public: bool is_unique_ref() { return m_refs == 1; } unsigned long ref_count() { return m_refs; } template - shared_object_ptr self_cast() { return shared_object_ptr(static_cast(this)); } + boost::intrusive_ptr self_cast() { return boost::intrusive_ptr(static_cast(this)); } template - shared_object_ptr dynamic_self_cast() { return shared_object_ptr(dynamic_cast(this)); } + boost::intrusive_ptr dynamic_self_cast() { return boost::intrusive_ptr(dynamic_cast(this)); } private: unsigned int m_refs; }; template -shared_object_ptr make_shared_object(Args... args) { return shared_object_ptr(new T(args...)); } +boost::intrusive_ptr make_shared_object(Args... args) { return boost::intrusive_ptr(new T(args...)); } } diff --git a/src/framework/ui/declarations.h b/src/framework/ui/declarations.h index 5fc04ef5..012a853a 100644 --- a/src/framework/ui/declarations.h +++ b/src/framework/ui/declarations.h @@ -36,15 +36,15 @@ class UIGridLayout; class UIAnchorLayout; class UIParticles; -typedef stdext::shared_object_ptr UIWidgetPtr; -typedef stdext::shared_object_ptr UIParticlesPtr; -typedef stdext::shared_object_ptr UITextEditPtr; -typedef stdext::shared_object_ptr UILayoutPtr; -typedef stdext::shared_object_ptr UIBoxLayoutPtr; -typedef stdext::shared_object_ptr UIHorizontalLayoutPtr; -typedef stdext::shared_object_ptr UIVerticalLayoutPtr; -typedef stdext::shared_object_ptr UIGridLayoutPtr; -typedef stdext::shared_object_ptr UIAnchorLayoutPtr; +typedef boost::intrusive_ptr UIWidgetPtr; +typedef boost::intrusive_ptr UIParticlesPtr; +typedef boost::intrusive_ptr UITextEditPtr; +typedef boost::intrusive_ptr UILayoutPtr; +typedef boost::intrusive_ptr UIBoxLayoutPtr; +typedef boost::intrusive_ptr UIHorizontalLayoutPtr; +typedef boost::intrusive_ptr UIVerticalLayoutPtr; +typedef boost::intrusive_ptr UIGridLayoutPtr; +typedef boost::intrusive_ptr UIAnchorLayoutPtr; typedef std::deque UIWidgetList; diff --git a/src/otclient/declarations.h b/src/otclient/declarations.h index fa06e51f..1a922922 100644 --- a/src/otclient/declarations.h +++ b/src/otclient/declarations.h @@ -50,25 +50,25 @@ class House; class Town; class CreatureType; -typedef stdext::shared_object_ptr MapViewPtr; -typedef stdext::shared_object_ptr TilePtr; -typedef stdext::shared_object_ptr ThingPtr; -typedef stdext::shared_object_ptr ItemPtr; -typedef stdext::shared_object_ptr ContainerPtr; -typedef stdext::shared_object_ptr CreaturePtr; -typedef stdext::shared_object_ptr MonsterPtr; -typedef stdext::shared_object_ptr NpcPtr; -typedef stdext::shared_object_ptr PlayerPtr; -typedef stdext::shared_object_ptr LocalPlayerPtr; -typedef stdext::shared_object_ptr EffectPtr; -typedef stdext::shared_object_ptr MissilePtr; -typedef stdext::shared_object_ptr AnimatedTextPtr; -typedef stdext::shared_object_ptr StaticTextPtr; -typedef stdext::shared_object_ptr ThingTypePtr; -typedef stdext::shared_object_ptr ItemTypePtr; -typedef stdext::shared_object_ptr HousePtr; -typedef stdext::shared_object_ptr TownPtr; -typedef stdext::shared_object_ptr CreatureTypePtr; +typedef boost::intrusive_ptr MapViewPtr; +typedef boost::intrusive_ptr TilePtr; +typedef boost::intrusive_ptr ThingPtr; +typedef boost::intrusive_ptr ItemPtr; +typedef boost::intrusive_ptr ContainerPtr; +typedef boost::intrusive_ptr CreaturePtr; +typedef boost::intrusive_ptr MonsterPtr; +typedef boost::intrusive_ptr NpcPtr; +typedef boost::intrusive_ptr PlayerPtr; +typedef boost::intrusive_ptr LocalPlayerPtr; +typedef boost::intrusive_ptr EffectPtr; +typedef boost::intrusive_ptr MissilePtr; +typedef boost::intrusive_ptr AnimatedTextPtr; +typedef boost::intrusive_ptr StaticTextPtr; +typedef boost::intrusive_ptr ThingTypePtr; +typedef boost::intrusive_ptr ItemTypePtr; +typedef boost::intrusive_ptr HousePtr; +typedef boost::intrusive_ptr TownPtr; +typedef boost::intrusive_ptr CreatureTypePtr; typedef std::vector ThingList; typedef std::vector ThingTypeList; @@ -81,8 +81,8 @@ typedef std::unordered_map TileMap; class ProtocolLogin; class ProtocolGame; -typedef stdext::shared_object_ptr ProtocolGamePtr; -typedef stdext::shared_object_ptr ProtocolLoginPtr; +typedef boost::intrusive_ptr ProtocolGamePtr; +typedef boost::intrusive_ptr ProtocolLoginPtr; // ui class UIItem; @@ -90,9 +90,9 @@ class UICreature; class UIMap; class UIProgressRect; -typedef stdext::shared_object_ptr UIItemPtr; -typedef stdext::shared_object_ptr UICreaturePtr; -typedef stdext::shared_object_ptr UIMapPtr; -typedef stdext::shared_object_ptr UIProgressRectPtr; +typedef boost::intrusive_ptr UIItemPtr; +typedef boost::intrusive_ptr UICreaturePtr; +typedef boost::intrusive_ptr UIMapPtr; +typedef boost::intrusive_ptr UIProgressRectPtr; #endif diff --git a/src/otclient/game.cpp b/src/otclient/game.cpp index 34949688..eaf3c5d7 100644 --- a/src/otclient/game.cpp +++ b/src/otclient/game.cpp @@ -1079,6 +1079,13 @@ void Game::mount(bool mount) m_mounted = mount; } +void Game::requestItemInfo(const ItemPtr& item, int index) +{ + if(!canPerformGameAction()) + return; + m_protocolGame->sendRequestItemInfo(item->getId(), item->getSubType(), index); +} + void Game::ping() { if(!m_protocolGame || !m_protocolGame->isConnected()) diff --git a/src/otclient/game.h b/src/otclient/game.h index 1ab75fa6..7252fc02 100644 --- a/src/otclient/game.h +++ b/src/otclient/game.h @@ -231,7 +231,7 @@ public: void mount(bool mount); // 910 only - //void requestItemInfo(); + void requestItemInfo(const ItemPtr& item, int index); //void reportRuleViolation2(); void ping(); diff --git a/src/otclient/item.cpp b/src/otclient/item.cpp index 917b5a58..8485543b 100644 --- a/src/otclient/item.cpp +++ b/src/otclient/item.cpp @@ -178,7 +178,7 @@ void Item::setId(uint32 id) { if(!g_things.isValidDatId(id, ThingCategoryItem)) id = 0; - //m_otbId = g_things.findOtbForClientId(id)->getServerId(); + //m_otbId = g_things.findItemTypeByClientId(id)->getServerId(); m_id = id; m_otbId = 0; } diff --git a/src/otclient/luafunctions.cpp b/src/otclient/luafunctions.cpp index 91c03331..244c2b7b 100644 --- a/src/otclient/luafunctions.cpp +++ b/src/otclient/luafunctions.cpp @@ -57,6 +57,7 @@ void OTClient::registerLuaFunctions() g_lua.bindSingletonFunction("g_things", "getDatSignature", &ThingTypeManager::getDatSignature, &g_things); g_lua.bindSingletonFunction("g_things", "getThingType", &ThingTypeManager::getThingType, &g_things); g_lua.bindSingletonFunction("g_things", "getItemType", &ThingTypeManager::getItemType, &g_things); + g_lua.bindSingletonFunction("g_things", "findItemTypeByClientId", &ThingTypeManager::findItemTypeByClientId, &g_things); g_lua.bindSingletonFunction("g_things", "findThingTypeByAttr", &ThingTypeManager::findThingTypeByAttr, &g_things); g_lua.bindSingletonFunction("g_things", "findItemTypeByCategory", &ThingTypeManager::findItemTypeByCategory, &g_things); @@ -164,7 +165,6 @@ void OTClient::registerLuaFunctions() g_lua.bindSingletonFunction("g_game", "inspectNpcTrade", &Game::inspectNpcTrade, &g_game); g_lua.bindSingletonFunction("g_game", "buyItem", &Game::buyItem, &g_game); g_lua.bindSingletonFunction("g_game", "sellItem", &Game::sellItem, &g_game); - g_lua.bindSingletonFunction("g_game", "ping", &Game::ping, &g_game); g_lua.bindSingletonFunction("g_game", "closeNpcTrade", &Game::closeNpcTrade, &g_game); g_lua.bindSingletonFunction("g_game", "requestTrade", &Game::requestTrade, &g_game); g_lua.bindSingletonFunction("g_game", "inspectTrade", &Game::inspectTrade, &g_game); @@ -179,6 +179,8 @@ void OTClient::registerLuaFunctions() g_lua.bindSingletonFunction("g_game", "requestQuestLine", &Game::requestQuestLine, &g_game); g_lua.bindSingletonFunction("g_game", "equipItem", &Game::equipItem, &g_game); g_lua.bindSingletonFunction("g_game", "mount", &Game::mount, &g_game); + g_lua.bindSingletonFunction("g_game", "requestItemInfo", &Game::requestItemInfo, &g_game); + g_lua.bindSingletonFunction("g_game", "ping", &Game::ping, &g_game); g_lua.bindSingletonFunction("g_game", "canPerformGameAction", &Game::canPerformGameAction, &g_game); g_lua.bindSingletonFunction("g_game", "canReportBugs", &Game::canReportBugs, &g_game); g_lua.bindSingletonFunction("g_game", "checkBotProtection", &Game::checkBotProtection, &g_game); @@ -333,6 +335,7 @@ void OTClient::registerLuaFunctions() g_lua.registerClass(); g_lua.bindClassMemberFunction("getId", &ThingType::getId); g_lua.bindClassMemberFunction("getMarketData", &ThingType::getMarketData); + g_lua.bindClassMemberFunction("getClothSlot", &ThingType::getClothSlot); g_lua.registerClass(); g_lua.bindClassStaticFunction("create", &Item::create); diff --git a/src/otclient/protocolgame.h b/src/otclient/protocolgame.h index 948f6941..dc17f9d1 100644 --- a/src/otclient/protocolgame.h +++ b/src/otclient/protocolgame.h @@ -103,7 +103,7 @@ public: void sendRequestQuestLog(); void sendRequestQuestLine(int questId); void sendNewNewRuleViolation(int reason, int action, const std::string& characterName, const std::string& comment, const std::string& translation); - void sendRequestItemInfo(int itemId, int index); + void sendRequestItemInfo(int itemId, int subType, int index); protected: void onConnect(); diff --git a/src/otclient/protocolgameparse.cpp b/src/otclient/protocolgameparse.cpp index 0b87c757..e20c4756 100644 --- a/src/otclient/protocolgameparse.cpp +++ b/src/otclient/protocolgameparse.cpp @@ -1280,12 +1280,18 @@ void ProtocolGame::parseChannelEvent(const InputMessagePtr& msg) void ProtocolGame::parseItemInfo(const InputMessagePtr& msg) { + std::vector> list; int size = msg->getU8(); for(int i=0;igetU16(); // id - msg->getU8(); // subtype - msg->getString(); // description + ItemPtr item(new Item); + item->setId(msg->getU16()); + item->setCountOrSubType(msg->getU8()); + + std::string desc = msg->getString(); + list.push_back(std::make_tuple(item, desc)); } + + g_lua.callGlobalField("g_game", "onItemInfo", list); } void ProtocolGame::parsePlayerInventory(const InputMessagePtr& msg) diff --git a/src/otclient/protocolgamesend.cpp b/src/otclient/protocolgamesend.cpp index 3e022ba4..a19f91cf 100644 --- a/src/otclient/protocolgamesend.cpp +++ b/src/otclient/protocolgamesend.cpp @@ -733,11 +733,11 @@ void ProtocolGame::sendNewNewRuleViolation(int reason, int action, const std::st send(msg); } -void ProtocolGame::sendRequestItemInfo(int itemId, int index) +void ProtocolGame::sendRequestItemInfo(int itemId, int subType, int index) { OutputMessagePtr msg(new OutputMessage); msg->addU8(Proto::ClientRequestItemInfo); - msg->addU8(1); // count, 1 for just one item + msg->addU8(subType); msg->addU16(itemId); msg->addU8(index); send(msg); diff --git a/src/otclient/thingtypemanager.cpp b/src/otclient/thingtypemanager.cpp index 065cbd91..0699643b 100644 --- a/src/otclient/thingtypemanager.cpp +++ b/src/otclient/thingtypemanager.cpp @@ -193,7 +193,7 @@ void ThingTypeManager::addItemType(const ItemTypePtr& itemType) m_itemTypes[id] = itemType; } -const ItemTypePtr& ThingTypeManager::findOtbForClientId(uint16 id) +const ItemTypePtr& ThingTypeManager::findItemTypeByClientId(uint16 id) { if(m_itemTypes.empty()) return m_nullItemType; diff --git a/src/otclient/thingtypemanager.h b/src/otclient/thingtypemanager.h index d57c3f23..b61585ff 100644 --- a/src/otclient/thingtypemanager.h +++ b/src/otclient/thingtypemanager.h @@ -41,7 +41,7 @@ public: void parseItemType(uint16 id, TiXmlElement *elem); void addItemType(const ItemTypePtr& itemType); - const ItemTypePtr& findOtbForClientId(uint16 id); + const ItemTypePtr& findItemTypeByClientId(uint16 id); const ThingTypePtr& getNullThingType() { return m_nullThingType; } const ItemTypePtr& getNullItemType() { return m_nullItemType; }