1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 21:23:52 +00:00

added missing getId functions to classes derived from MWWorld::Class

This commit is contained in:
Marc Zinnschlag 2014-07-18 09:56:58 +02:00
parent 8952154488
commit 4fb897f2f8
32 changed files with 128 additions and 0 deletions

View file

@ -25,6 +25,11 @@
namespace MWClass
{
std::string Activator::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Activator>()->mBase->mId;
}
void Activator::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -13,6 +13,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -21,6 +21,11 @@
namespace MWClass
{
std::string Apparatus::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Apparatus>()->mBase->mId;
}
void Apparatus::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -13,6 +13,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual float getWeight (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;

View file

@ -25,6 +25,11 @@
namespace MWClass
{
std::string Armor::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Armor>()->mBase->mId;
}
void Armor::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual float getWeight (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;

View file

@ -22,6 +22,11 @@
namespace MWClass
{
std::string Book::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Book>()->mBase->mId;
}
void Book::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -22,6 +22,11 @@
namespace MWClass
{
std::string Clothing::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Clothing>()->mBase->mId;
}
void Clothing::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -43,6 +43,11 @@ namespace
namespace MWClass
{
std::string Container::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Container>()->mBase->mId;
}
void Container::ensureCustomData (const MWWorld::Ptr& ptr) const
{
if (!ptr.getRefData().getCustomData())

View file

@ -15,6 +15,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -27,6 +27,11 @@ namespace
namespace MWClass
{
std::string CreatureLevList::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::CreatureLevList>()->mBase->mId;
}
std::string CreatureLevList::getName (const MWWorld::Ptr& ptr) const
{
return "";

View file

@ -11,6 +11,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual std::string getName (const MWWorld::Ptr& ptr) const;
///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string.

View file

@ -42,6 +42,11 @@ namespace
namespace MWClass
{
std::string Door::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Door>()->mBase->mId;
}
void Door::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -16,6 +16,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -5,6 +5,11 @@
namespace MWClass
{
std::string ItemLevList::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::ItemLevList>()->mBase->mId;
}
std::string ItemLevList::getName (const MWWorld::Ptr& ptr) const
{
return "";

View file

@ -9,6 +9,9 @@ namespace MWClass
{
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual std::string getName (const MWWorld::Ptr& ptr) const;
///< \return name (the one that is to be presented to the user; not the internal one);
/// can return an empty string.

View file

@ -47,6 +47,11 @@ namespace
namespace MWClass
{
std::string Light::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Light>()->mBase->mId;
}
void Light::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -14,6 +14,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -22,6 +22,11 @@
namespace MWClass
{
std::string Lockpick::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Lockpick>()->mBase->mId;
}
void Lockpick::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -38,6 +38,11 @@ bool isGold (const MWWorld::Ptr& ptr)
namespace MWClass
{
std::string Miscellaneous::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Miscellaneous>()->mBase->mId;
}
void Miscellaneous::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -24,6 +24,11 @@
namespace MWClass
{
std::string Potion::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Potion>()->mBase->mId;
}
void Potion::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -22,6 +22,11 @@
namespace MWClass
{
std::string Probe::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Probe>()->mBase->mId;
}
void Probe::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -21,6 +21,11 @@
namespace MWClass
{
std::string Repair::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Repair>()->mBase->mId;
}
void Repair::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
const std::string model = getModel(ptr);

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering

View file

@ -12,6 +12,11 @@
namespace MWClass
{
std::string Static::getId (const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Static>()->mBase->mId;
}
void Static::insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const
{
MWWorld::LiveCellRef<ESM::Static> *ref =

View file

@ -12,6 +12,9 @@ namespace MWClass
public:
/// Return ID of \a ptr
virtual std::string getId (const MWWorld::Ptr& ptr) const;
virtual void insertObjectRendering (const MWWorld::Ptr& ptr, MWRender::RenderingInterface& renderingInterface) const;
///< Add reference into a cell for rendering