Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

Spell.h

00001 /*
00002  * Spell.h -- class interface for spells
00003  * Copyright (C) 2002  Eric Lemings <elemings@users.sourceforge.net>
00004  *
00005  * This software is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This software is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this software; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00018  * 02111-1307, USA
00019  *
00020  * RCS: $Id: Spell.h,v 1.5 2003/04/04 20:22:47 elemings Exp $
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 /* !defined OGS_MAGIC_SPELL_H */
00112 
00113 #endif /* defined __cplusplus */
00114 

Generated on Sun Apr 20 03:36:26 2003 for Open Gaming System (OGS) by doxygen1.3