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_SUBSCHOOL_H
00026 # define OGS_MAGIC_SUBSCHOOL_H
00027
00028 # include <string>
00029
00030 # include <ogs/magic/Namespace.h>
00031 # include <ogs/magic/School.h>
00032
00033 OGS_BEGIN_MAGIC_NAMESPACE
00034
00038 class Subschool: public School {
00039 public:
00041 enum Type {
00042
00044 CALLING = 1,
00045
00047 CREATION = 2,
00048
00050 HEALING = 3,
00051
00053 SUMMONING = 4,
00054
00056 CHARM = 5,
00057
00059 COMPULSION = 6,
00060
00062 FIGMENT = 7,
00063
00065 GLAMER = 8,
00066
00068 PATTERN = 9,
00069
00071 PHANTASM = 10,
00072
00074 SHADOW = 11
00075 };
00076
00077 Subschool (Type type);
00078 Type getType () const;
00079 std::string getName () const;
00080
00081 private:
00082 Type type;
00083
00084 static bool isValid (Type type);
00085 static School::Type getSchool (Type type);
00086 };
00087
00093 inline Subschool::Type Subschool::getType () const {
00094 return (this->type);
00095 }
00096
00103 inline School::Type Subschool::getSchool (Type type) {
00104 return (type == CALLING ||
00105 type == CREATION ||
00106 type == HEALING ||
00107 type == SUMMONING? School::CONJURATION:
00108 type == CHARM ||
00109 type == COMPULSION? School::ENCHANTMENT:
00110 type == FIGMENT ||
00111 type == GLAMER ||
00112 type == PATTERN ||
00113 type == PHANTASM ||
00114 type == SHADOW? School::ILLUSION: School::Type (0));
00115 }
00116
00117 OGS_END_MAGIC_NAMESPACE
00118
00119 # endif
00120
00121 #endif
00122