OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
customdata.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWWORLD_CUSTOMDATA_H
2 #define GAME_MWWORLD_CUSTOMDATA_H
3 
4 namespace MWClass
5 {
6  class CreatureCustomData;
7  class NpcCustomData;
8  class ContainerCustomData;
9  class DoorCustomData;
10  class CreatureLevListCustomData;
11 }
12 
13 namespace MWWorld
14 {
16  class CustomData
17  {
18  public:
19 
20  virtual ~CustomData() {}
21 
22  virtual CustomData *clone() const = 0;
23 
24  // Fast version of dynamic_cast<X&>. Needs to be overridden in the respective class.
25 
28 
30  virtual const MWClass::NpcCustomData& asNpcCustomData() const;
31 
33 
35  virtual const MWClass::DoorCustomData& asDoorCustomData() const;
36 
39  };
40 }
41 
42 #endif
virtual CustomData * clone() const =0
virtual MWClass::CreatureCustomData & asCreatureCustomData()
Definition: customdata.cpp:10
Definition: npc.cpp:243
Definition: creature.cpp:52
virtual MWClass::NpcCustomData & asNpcCustomData()
Definition: customdata.cpp:24
Base class for the MW-class-specific part of RefData.
Definition: customdata.hpp:16
virtual MWClass::ContainerCustomData & asContainerCustomData()
Definition: customdata.cpp:38
virtual MWClass::CreatureLevListCustomData & asCreatureLevListCustomData()
Definition: customdata.cpp:59
virtual ~CustomData()
Definition: customdata.hpp:20
Definition: door.cpp:34
Definition: creaturelevlist.cpp:13
Definition: container.cpp:33
virtual MWClass::DoorCustomData & asDoorCustomData()
Definition: customdata.cpp:45