1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/openmw/mwworld/customdata.hpp
2015-12-19 16:19:52 +01:00

43 lines
1.3 KiB
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 const MWClass::CreatureCustomData& asCreatureCustomData() const;
virtual MWClass::NpcCustomData& asNpcCustomData();
virtual const MWClass::NpcCustomData& asNpcCustomData() const;
virtual MWClass::ContainerCustomData& asContainerCustomData();
virtual MWClass::DoorCustomData& asDoorCustomData();
virtual const MWClass::DoorCustomData& asDoorCustomData() const;
virtual MWClass::CreatureLevListCustomData& asCreatureLevListCustomData();
virtual const MWClass::CreatureLevListCustomData& asCreatureLevListCustomData() const;
};
}
#endif