00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifdef __cplusplus
00024
00025 # ifndef OGS_MAGIC_SPELL_H
00026 # define OGS_MAGIC_SPELL_H
00027
00028 # include <list>
00029 # include <vector>
00030
00031 # include <ogs/support/Object.h>
00032 # include <ogs/magic/Component.h>
00033 # include <ogs/magic/Descriptors.h>
00034 # include <ogs/magic/Namespace.h>
00035 # include <ogs/magic/Range.h>
00036 # include <ogs/magic/School.h>
00037
00038 OGS_BEGIN_MAGIC_NAMESPACE
00039
00040 class MetamagicFeat;
00041
00045 class Spell: public ogs::support::Object {
00046 public:
00048 typedef std::list<Component> Components;
00049
00056 virtual const School& getSchool () const = 0;
00057
00058 virtual Descriptors getDescriptors () const;
00059
00067 virtual Components getComponents () const = 0;
00068
00075 virtual Range getRange () const = 0;
00076
00077 virtual bool attachMetamagicFeat (MetamagicFeat& metamagicFeat);
00078
00079 virtual ~Spell () { }
00080
00081 protected:
00082 Spell ();
00083
00084 private:
00085 typedef std::vector<MetamagicFeat*> MetamagicFeats;
00086 MetamagicFeats _metamagicFeats;
00087 };
00088
00097 inline Descriptors Spell::getDescriptors () const {
00098 Descriptors descriptors;
00099 return (descriptors);
00100 }
00101
00107 inline Spell::Spell (): _metamagicFeats () { }
00108
00109 OGS_END_MAGIC_NAMESPACE
00110
00111 # endif
00112
00113 #endif
00114