1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 00:19:56 +00:00
openmw-tes3mp/apps/openmw/mwworld/customdata.hpp
scrawl d9bbd83b09 Accept a ConstPtr in getToolTipInfo
Accept a ConstPtr in functions used by getToolTipInfo
2015-12-18 15:47:16 +01:00

39 lines
1,020 B
C++

#ifndef GAME_MWWORLD_CUSTOMDATA_H
#define GAME_MWWORLD_CUSTOMDATA_H
namespace MWClass
{
class CreatureCustomData;
class NpcCustomData;
class ContainerCustomData;
class DoorCustomData;
class CreatureLevListCustomData;
}
namespace MWWorld
{
/// \brief Base class for the MW-class-specific part of RefData
class CustomData
{
public:
virtual ~CustomData() {}
virtual CustomData *clone() const = 0;
// Fast version of dynamic_cast<X&>. Needs to be overridden in the respective class.
virtual MWClass::CreatureCustomData& asCreatureCustomData();
virtual MWClass::NpcCustomData& asNpcCustomData();
virtual const MWClass::NpcCustomData& asNpcCustomData() const;
virtual MWClass::ContainerCustomData& asContainerCustomData();
virtual MWClass::DoorCustomData& asDoorCustomData();
virtual MWClass::CreatureLevListCustomData& asCreatureLevListCustomData();
};
}
#endif