2012-01-24 10:23:22 +00:00
|
|
|
#ifndef GAME_MWWORLD_CUSTOMDATA_H
|
|
|
|
#define GAME_MWWORLD_CUSTOMDATA_H
|
|
|
|
|
2015-11-29 13:13:14 +00:00
|
|
|
namespace MWClass
|
|
|
|
{
|
|
|
|
class CreatureCustomData;
|
|
|
|
class NpcCustomData;
|
|
|
|
class ContainerCustomData;
|
|
|
|
class DoorCustomData;
|
|
|
|
class CreatureLevListCustomData;
|
|
|
|
}
|
|
|
|
|
2012-01-24 10:23:22 +00:00
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
/// \brief Base class for the MW-class-specific part of RefData
|
|
|
|
class CustomData
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual ~CustomData() {}
|
|
|
|
|
|
|
|
virtual CustomData *clone() const = 0;
|
2015-11-29 13:13:14 +00:00
|
|
|
|
|
|
|
// Fast version of dynamic_cast<X&>. Needs to be overridden in the respective class.
|
|
|
|
|
|
|
|
virtual MWClass::CreatureCustomData& asCreatureCustomData();
|
2015-12-19 15:13:00 +00:00
|
|
|
virtual const MWClass::CreatureCustomData& asCreatureCustomData() const;
|
2015-11-29 13:13:14 +00:00
|
|
|
|
|
|
|
virtual MWClass::NpcCustomData& asNpcCustomData();
|
2015-12-18 14:27:06 +00:00
|
|
|
virtual const MWClass::NpcCustomData& asNpcCustomData() const;
|
2015-11-29 13:13:14 +00:00
|
|
|
|
|
|
|
virtual MWClass::ContainerCustomData& asContainerCustomData();
|
2018-12-03 16:21:40 +00:00
|
|
|
virtual const MWClass::ContainerCustomData& asContainerCustomData() const;
|
2015-11-29 13:13:14 +00:00
|
|
|
|
|
|
|
virtual MWClass::DoorCustomData& asDoorCustomData();
|
2015-12-19 14:57:37 +00:00
|
|
|
virtual const MWClass::DoorCustomData& asDoorCustomData() const;
|
2015-11-29 13:13:14 +00:00
|
|
|
|
|
|
|
virtual MWClass::CreatureLevListCustomData& asCreatureLevListCustomData();
|
2015-12-19 15:19:52 +00:00
|
|
|
virtual const MWClass::CreatureLevListCustomData& asCreatureLevListCustomData() const;
|
2012-01-24 10:23:22 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|