--- deliantra/server/include/traits.h 2006/08/31 09:19:34 1.1 +++ deliantra/server/include/traits.h 2006/12/15 19:59:20 1.6 @@ -1,13 +1,14 @@ #ifndef TRAITS_H__ #define TRAITS_H__ -struct pl; +struct client; +struct player; struct object; -struct mapstruct; -struct archt; +struct maptile; +struct archetype; struct region; struct party; -struct mapstruct; +struct treasurelist; // could have used templates, but a more traditional C api // uses more explicit typing which is ok for this purpose. @@ -22,6 +23,7 @@ DT_DATA, // string + length DT_OBJECT, DT_MAP, + DT_SOCKET, DT_PLAYER, DT_ARCH, DT_PARTY, @@ -35,52 +37,62 @@ template<> struct cftype { - enum { dt = DT_INT }; + static const data_type dt = DT_INT; }; template<> struct cftype { - enum { dt = DT_INT64 }; + static const data_type dt = DT_INT64; }; template<> struct cftype { - enum { dt = DT_DOUBLE }; + static const data_type dt = DT_DOUBLE; }; template<> struct cftype { - enum { dt = DT_STRING }; + static const data_type dt = DT_STRING; }; template<> struct cftype { - enum { dt = DT_OBJECT }; + static const data_type dt = DT_OBJECT; }; template<> -struct cftype { - enum { dt = DT_PLAYER }; +struct cftype { + static const data_type dt = DT_SOCKET; }; template<> -struct cftype { - enum { dt = DT_MAP }; +struct cftype { + static const data_type dt = DT_PLAYER; }; template<> -struct cftype { - enum { dt = DT_ARCH }; +struct cftype { + static const data_type dt = DT_MAP; +}; + +template<> +struct cftype { + static const data_type dt = DT_ARCH; }; template<> struct cftype { - enum { dt = DT_PARTY }; + static const data_type dt = DT_PARTY; }; template<> struct cftype { - enum { dt = DT_REGION }; + static const data_type dt = DT_REGION; +}; + +template<> +struct cftype { + static const data_type dt = DT_REGION; }; #endif