1 #ifndef __GS__TYPES_H__
2 #define __GS__TYPES_H__
6 #include <GameServ/GameServException.h>
7 using GameServ::Exceptions::GameServException
;
14 //! Holds the exceptions related to types and their conversions
17 //! Generic type exception possibly due to conversion or improper usage
18 class TypeException
: public GameServException
21 TypeException(const string
&ErrorMsg
, const char *pFilename
, int SourceLine
);
22 TypeException(const string
&ErrorMsg
);
30 //! Logical ItemType enumerator
33 Weapon
, Armor
, Potion
, NOTYPE
36 //! Get the name of an item type
37 static string
GetName(ItemType itemtype
);
39 //! Parse the name and return the enumeration value
40 static ItemType
Parse(const string
&itemtype
);
43 //! Internal struct to hold type information statically in a table
44 typedef struct itemtypeinfo
46 ItemTypes::ItemType itemtype
; //!< The ItemType enumeration value
47 const char *name
; //!< The Name of the type
50 static const itemtypeinfo mItemTypeInfoTable
[];