1 | #ifndef TRAITS_H__ |
1 | #ifndef TRAITS_H__ |
2 | #define TRAITS_H__ |
2 | #define TRAITS_H__ |
3 | |
3 | |
|
|
4 | struct client_container; |
4 | struct client; |
5 | struct client; |
5 | struct player; |
6 | struct player; |
6 | struct object; |
7 | struct object; |
7 | struct maptile; |
8 | struct maptile; |
|
|
9 | struct mapspace; |
8 | struct archetype; |
10 | struct archetype; |
9 | struct region; |
11 | struct region; |
10 | struct party; |
12 | struct party; |
11 | struct treasurelist; |
13 | struct treasurelist; |
12 | |
14 | |
… | |
… | |
21 | DT_DOUBLE, |
23 | DT_DOUBLE, |
22 | DT_STRING, // 0-terminated string |
24 | DT_STRING, // 0-terminated string |
23 | DT_DATA, // string + length |
25 | DT_DATA, // string + length |
24 | DT_OBJECT, |
26 | DT_OBJECT, |
25 | DT_MAP, |
27 | DT_MAP, |
26 | DT_SOCKET, |
28 | DT_CLIENT, |
27 | DT_PLAYER, |
29 | DT_PLAYER, |
28 | DT_ARCH, |
30 | DT_ARCH, |
29 | DT_PARTY, |
31 | DT_PARTY, |
30 | DT_REGION, |
32 | DT_REGION, |
31 | |
33 | |
… | |
… | |
60 | static const data_type dt = DT_OBJECT; |
62 | static const data_type dt = DT_OBJECT; |
61 | }; |
63 | }; |
62 | |
64 | |
63 | template<> |
65 | template<> |
64 | struct cftype<client> { |
66 | struct cftype<client> { |
65 | static const data_type dt = DT_SOCKET; |
67 | static const data_type dt = DT_CLIENT; |
66 | }; |
68 | }; |
67 | |
69 | |
68 | template<> |
70 | template<> |
69 | struct cftype<player> { |
71 | struct cftype<player> { |
70 | static const data_type dt = DT_PLAYER; |
72 | static const data_type dt = DT_PLAYER; |