[ogs-changes] dist/c++/ogs/spells Abjuration.h,1.3,1.4 Conjuration.h,1.3,1.4 Divination.h,1.3,1.4 En
Status: Alpha
Brought to you by:
elemings
|
From: <ele...@us...> - 2003-05-02 19:07:10
|
Update of /cvsroot/ogs/dist/c++/ogs/spells
In directory sc8-pr-cvs1:/tmp/cvs-serv32451/ogs/spells
Modified Files:
Abjuration.h Conjuration.h Divination.h Enchantment.h
Evocation.h Illusion.h Makefile.am Namespace.h Necromancy.h
Transmutation.h Universal.h
Log Message:
See C++ ChangeLog (May 2) for details.
Index: Abjuration.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Abjuration.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Abjuration.h 25 Feb 2003 19:40:28 -0000 1.3
--- Abjuration.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 26,29 ****
--- 26,31 ----
# define OGS_SPELLS_ABJURATION_H
+ # include <cassert>
+
# include <ogs/magic/Spell.h>
# include <ogs/spells/Namespace.h>
***************
*** 31,34 ****
--- 33,39 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Abjuration school. This class is the abstract base
***************
*** 36,55 ****
*/
class Abjuration: public ogs::magic::Spell {
! public:
! const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school for this type of spell. All Abjuration spells
! * are in the Abjuration school.
! *
! * @return Abjuration school.
*/
! inline const ogs::magic::School& Abjuration::getSchool () const {
! // If school needs to be visible outside this function, promote school
! // to a private static member.
! using ogs::magic::School;
! static School school (School::ABJURATION);
! return (school);
}
--- 41,59 ----
*/
class Abjuration: public ogs::magic::Spell {
! protected:
! Abjuration (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new abjuration spell.
*/
! inline
! Abjuration::Abjuration (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors):
! Spell (School (School::ABJURATION), components, range, descriptors) {
! // empty constructor body
}
Index: Conjuration.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Conjuration.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Conjuration.h 25 Feb 2003 19:40:29 -0000 1.3
--- Conjuration.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 26,29 ****
--- 26,31 ----
# define OGS_SPELLS_CONJURATION_H
+ # include <cassert>
+
# include <ogs/magic/Spell.h>
# include <ogs/spells/Namespace.h>
***************
*** 31,34 ****
--- 33,39 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Conjuration school. This class is the abstract base
***************
*** 36,55 ****
*/
class Conjuration: public ogs::magic::Spell {
! public:
! virtual const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school (or subschool) for this type of spell. All
! * Conjuration spells are in the Conjuration school or a Conjuration
! * subschool. Derived classes may override this function to return a
! * Conjuration subschool.
! *
! * @return Conjuration school.
*/
! inline const ogs::magic::School& Conjuration::getSchool () const {
! using ogs::magic::School;
! static School school (School::CONJURATION);
! return (school);
}
--- 41,69 ----
*/
class Conjuration: public ogs::magic::Spell {
! protected:
! Conjuration (ogs::magic::Components components,
! const ogs::magic::Range& range,
! const School& school = School (School::CONJURATION),
! Descriptors descriptors = Descriptors ());
! virtual ~Conjuration () = 0;
};
/**
! * Create a new conjuration spell. The school of the new conjuration
! * spell is the conjuration school by default but derived classes can
! * specify a conjuration subschool instead.
*/
! inline
! Conjuration::Conjuration (ogs::magic::Components components,
! const ogs::magic::Range& range,
! const School& school,
! Descriptors descriptors):
! Spell (school, components, range, descriptors) {
! assert (school.getType () == School::CONJURATION);
! }
!
! inline
! Conjuration::~Conjuration () {
! // empty destructor body
}
Index: Divination.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Divination.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Divination.h 25 Feb 2003 19:40:29 -0000 1.3
--- Divination.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 31,34 ****
--- 31,37 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Divination school. This class is the abstract base
***************
*** 36,53 ****
*/
class Divination: public ogs::magic::Spell {
! public:
! const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school for this type of spell. All Divination spells
! * are in the Divination school.
! *
! * @return Divination school.
*/
! inline const ogs::magic::School& Divination::getSchool () const {
! using ogs::magic::School;
! static School school (School::DIVINATION);
! return (school);
}
--- 39,57 ----
*/
class Divination: public ogs::magic::Spell {
! protected:
! Divination (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new divination spell.
*/
! inline
! Divination::Divination (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors):
! Spell (School (School::DIVINATION), components, range, descriptors) {
! // empty constructor body
}
Index: Enchantment.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Enchantment.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Enchantment.h 25 Feb 2003 19:40:30 -0000 1.3
--- Enchantment.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 26,29 ****
--- 26,31 ----
# define OGS_SPELLS_ENCHANTMENT_H
+ # include <cassert>
+
# include <ogs/magic/Spell.h>
# include <ogs/spells/Namespace.h>
***************
*** 31,34 ****
--- 33,39 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Enchantment school. This class is the abstract base
***************
*** 36,55 ****
*/
class Enchantment: public ogs::magic::Spell {
! public:
! virtual const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school (or subschool) for this type of spell. All
! * Enchantment spells are in the Enchantment school or an Enchantment
! * subschool. Derived classes may override this function to return an
! * Enchantment subschool.
! *
! * @return Enchantment school.
*/
! inline const ogs::magic::School& Enchantment::getSchool () const {
! using ogs::magic::School;
! static School school (School::ENCHANTMENT);
! return (school);
}
--- 41,63 ----
*/
class Enchantment: public ogs::magic::Spell {
! protected:
! Enchantment (ogs::magic::Components components,
! const ogs::magic::Range& range,
! const School& school = School (School::ENCHANTMENT),
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new enchantment spell. The school of the new enchantment
! * spell is the enchantment school by default but derived classes can
! * specify a enchantment subschool instead.
*/
! inline
! Enchantment::Enchantment (ogs::magic::Components components,
! const ogs::magic::Range& range,
! const School& school,
! Descriptors descriptors):
! Spell (school, components, range, descriptors) {
! assert (school.getType () == School::ENCHANTMENT);
}
Index: Evocation.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Evocation.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Evocation.h 25 Feb 2003 19:40:31 -0000 1.3
--- Evocation.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 31,34 ****
--- 31,37 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Evocation school. This class is the abstract base
***************
*** 37,53 ****
class Evocation: public ogs::magic::Spell {
public:
! const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school for this type of spell. All Evocation spells
! * are in the Evocation school.
! *
! * @return Evocation school.
*/
! inline const ogs::magic::School& Evocation::getSchool () const {
! using ogs::magic::School;
! static School school (School::EVOCATION);
! return (school);
}
--- 40,57 ----
class Evocation: public ogs::magic::Spell {
public:
! Evocation (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new evocation spell.
*/
! inline
! Evocation::Evocation (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors):
! Spell (School (School::EVOCATION), components, range, descriptors) {
! // empty constructor body
}
Index: Illusion.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Illusion.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Illusion.h 25 Feb 2003 19:40:32 -0000 1.3
--- Illusion.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 26,29 ****
--- 26,31 ----
# define OGS_SPELLS_ILLUSION_H
+ # include <cassert>
+
# include <ogs/magic/Spell.h>
# include <ogs/spells/Namespace.h>
***************
*** 31,34 ****
--- 33,39 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Illusion school. This class is the abstract base
***************
*** 36,55 ****
*/
class Illusion: public ogs::magic::Spell {
! public:
! virtual const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school (or subschool) for this type of spell. All
! * Illusion spells are in the Illusion school or an Illusion subschool.
! * Derived classes may override this function to return an Illusion
! * subschool.
! *
! * @return Illusion school.
*/
! inline const ogs::magic::School& Illusion::getSchool () const {
! using ogs::magic::School;
! static School school (School::ILLUSION);
! return (school);
}
--- 41,63 ----
*/
class Illusion: public ogs::magic::Spell {
! protected:
! Illusion (ogs::magic::Components components,
! const ogs::magic::Range& range,
! const School& school = School (School::ILLUSION),
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new illusion spell. The school of the new illusion
! * spell is the illusion school by default but derived classes can
! * specify a illusion subschool instead.
*/
! inline
! Illusion::Illusion (ogs::magic::Components components,
! const ogs::magic::Range& range,
! const School& school,
! Descriptors descriptors):
! Spell (school, components, range, descriptors) {
! assert (school.getType () == School::ILLUSION);
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Makefile.am 23 Mar 2003 22:14:36 -0000 1.5
--- Makefile.am 2 May 2003 19:06:35 -0000 1.6
***************
*** 56,60 ****
libogs_spells_la_DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
libogs_spells_la_DEPENDENCIES = \
! $(top_builddir)/ogs/magic/libogs-magic.la
libogs_spells_la_SOURCES =
--- 56,63 ----
libogs_spells_la_DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
libogs_spells_la_DEPENDENCIES = \
! $(top_builddir)/ogs/magic/libogs-magic.la \
! conjurations/libogs-conjurations.la
libogs_spells_la_SOURCES =
+ libogs_spells_la_LIBADD = \
+ conjurations/libogs-conjurations.la
Index: Namespace.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Namespace.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Namespace.h 18 Apr 2003 01:41:07 -0000 1.3
--- Namespace.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 31,44 ****
* @namespace ogs::spells
*
! * Abstract base classes for spells in each school of magic. A campaign
! * set in a magical game world can literally have hundreds of different
! * spells. For this reason, grouping the spells by school is a good way
! * to organize the spell classes. The classes in this package are used
! * as the base classes for these spells.
! *
! * @todo
! * Change the school and subschool virtual functions into data members
! * of the @c Spell class passed in by the constructor. Remove the base
! * classes for spells.
*/
# define OGS_BEGIN_SPELLS_NAMESPACE \
--- 31,39 ----
* @namespace ogs::spells
*
! * Abstract base classes for spells in each school of magic. A magical
! * campaign setting can literally have hundreds of different spells.
! * To partition this class hierarchy, this namespace provides base
! * classes for spells in each school rather than deriving hundreds of
! * spells directly from the @c Spell class.
*/
# define OGS_BEGIN_SPELLS_NAMESPACE \
Index: Necromancy.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Necromancy.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Necromancy.h 25 Feb 2003 19:40:33 -0000 1.3
--- Necromancy.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 31,34 ****
--- 31,37 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Necromancy school. This class is the abstract base
***************
*** 37,53 ****
class Necromancy: public ogs::magic::Spell {
public:
! const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school for this type of spell. All Necromancy spells
! * are in the Necromancy school.
! *
! * @return Necromancy school.
*/
! inline const ogs::magic::School& Necromancy::getSchool () const {
! using ogs::magic::School;
! static School school (School::NECROMANCY);
! return (school);
}
--- 40,57 ----
class Necromancy: public ogs::magic::Spell {
public:
! Necromancy (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new necromancy spell.
*/
! inline
! Necromancy::Necromancy (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors):
! Spell (School (School::NECROMANCY), components, range, descriptors) {
! // empty constructor body
}
Index: Transmutation.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Transmutation.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Transmutation.h 25 Feb 2003 19:40:34 -0000 1.3
--- Transmutation.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 31,34 ****
--- 31,37 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Transmutation school. This class is the abstract base
***************
*** 37,53 ****
class Transmutation: public ogs::magic::Spell {
public:
! const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school for this type of spell. All Transmutation
! * spells are in the Transmutation school.
! *
! * @return Transmutation school.
*/
! inline const ogs::magic::School& Transmutation::getSchool () const {
! using ogs::magic::School;
! static School school (School::TRANSMUTATION);
! return (school);
}
--- 40,57 ----
class Transmutation: public ogs::magic::Spell {
public:
! Transmutation (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new transmutation spell.
*/
! inline
! Transmutation::Transmutation (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors):
! Spell (School (School::TRANSMUTATION), components, range, descriptors) {
! // empty constructor body
}
Index: Universal.h
===================================================================
RCS file: /cvsroot/ogs/dist/c++/ogs/spells/Universal.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Universal.h 25 Feb 2003 19:40:34 -0000 1.3
--- Universal.h 2 May 2003 19:06:35 -0000 1.4
***************
*** 31,34 ****
--- 31,37 ----
OGS_BEGIN_SPELLS_NAMESPACE
+ using ogs::magic::School;
+ using ogs::magic::Descriptors;
+
/**
* A spell in the Universal school. This class is the abstract base
***************
*** 37,53 ****
class Universal: public ogs::magic::Spell {
public:
! const ogs::magic::School& getSchool () const;
};
/**
! * Determine the school for this type of spell. All Universal spells
! * are in the Universal school.
! *
! * @return Universal school.
*/
! inline const ogs::magic::School& Universal::getSchool () const {
! using ogs::magic::School;
! static School school (School::UNIVERSAL);
! return (school);
}
--- 40,57 ----
class Universal: public ogs::magic::Spell {
public:
! Universal (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors = Descriptors ());
};
/**
! * Create a new universal spell.
*/
! inline
! Universal::Universal (ogs::magic::Components components,
! const ogs::magic::Range& range,
! Descriptors descriptors):
! Spell (School (School::UNIVERSAL), components, range, descriptors) {
! // empty constructor body
}
|