forked from borzh/botrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
type2string.h
173 lines (117 loc) · 8.38 KB
/
type2string.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#ifndef __BOTRIX_TYPE_TO_STRING_H__
#define __BOTRIX_TYPE_TO_STRING_H__
#include "mods/hl2dm/types_hl2dm.h"
//****************************************************************************************************************
/// Useful class to get type from string and viceversa.
//****************************************************************************************************************
class CTypeToString
{
public:
//------------------------------------------------------------------------------------------------------------
/// Get string from vector of strings.
//------------------------------------------------------------------------------------------------------------
static const good::string& StringVectorToString( const StringVector& aStrings );
//------------------------------------------------------------------------------------------------------------
/// Get bool from string (on/off). -1 = invalid string.
//------------------------------------------------------------------------------------------------------------
static int BoolFromString( const good::string& sBool );
/// Get string from bool.
static const good::string& BoolToString( bool b );
//------------------------------------------------------------------------------------------------------------
/// Get mod id from string.
//------------------------------------------------------------------------------------------------------------
static TModId ModFromString( const good::string& sMod );
/// Get string from mod id.
static const good::string& ModToString( TModId iMod );
//------------------------------------------------------------------------------------------------------------
/// Get access flags from string.
//------------------------------------------------------------------------------------------------------------
static int AccessFlagsFromString( const good::string& sFlags );
/// Get string from access flags.
static const good::string& AccessFlagsToString( TCommandAccessFlags iFlags );
//------------------------------------------------------------------------------------------------------------
/// Get waypoint flags from string.
//------------------------------------------------------------------------------------------------------------
static int WaypointFlagsFromString( const good::string& sFlags );
/// Get string from waypoint flags.
static const good::string& WaypointFlagsToString( TWaypointFlags iFlags );
//------------------------------------------------------------------------------------------------------------
/// Get path flags from string.
//------------------------------------------------------------------------------------------------------------
static int PathFlagsFromString( const good::string& sFlags );
/// Get string from path flags.
static const good::string& PathFlagsToString( TPathFlags iFlags );
//------------------------------------------------------------------------------------------------------------
/// Get waypoint draw types from string.
//------------------------------------------------------------------------------------------------------------
static int WaypointDrawFlagsFromString( const good::string& sFlags );
/// Get string from waypoint draw types.
static const good::string& WaypointDrawFlagsToString( TWaypointDrawFlags iFlags );
//------------------------------------------------------------------------------------------------------------
/// Get path draw types from string.
//------------------------------------------------------------------------------------------------------------
static int PathDrawFlagsFromString( const good::string& sFlags );
/// Get string from waypoint draw flags.
static const good::string& PathDrawFlagsToString( TPathDrawFlags iFlags );
//------------------------------------------------------------------------------------------------------------
/// Get item type from string.
//------------------------------------------------------------------------------------------------------------
static int EntityTypeFromString( const good::string& sType );
/// Get string from item type.
static const good::string& EntityTypeToString( TEntityType iType );
//------------------------------------------------------------------------------------------------------------
/// Get item type flag from string. Used to draw entities on map.
//------------------------------------------------------------------------------------------------------------
static int EntityTypeFlagsFromString( const good::string& sFlag );
/// Get string from item type flags.
static const good::string& EntityTypeFlagsToString( TEntityTypeFlags iItemTypeFlags );
//------------------------------------------------------------------------------------------------------------
/// Get item flags from string. Used to draw entities on map.
//------------------------------------------------------------------------------------------------------------
static int EntityClassFlagsFromString( const good::string& sFlags );
/// Get string from item flags.
static const good::string& EntityClassFlagsToString( TEntityFlags iItemFlags );
//------------------------------------------------------------------------------------------------------------
/// Get item draw flags from string.
//------------------------------------------------------------------------------------------------------------
static int ItemDrawFlagsFromString( const good::string& sFlags );
/// Get string from item draw flags.
static const good::string& ItemDrawFlagsToString( TItemDrawFlags iFlags );
//------------------------------------------------------------------------------------------------------------
/// Get weapon flag from string.
//------------------------------------------------------------------------------------------------------------
static int WeaponTypeFromString( const good::string& sType );
/// Get string from weapon flags.
static const good::string& WeaponTypeToString( TWeaponType iType );
//------------------------------------------------------------------------------------------------------------
/// Get bot preference from string.
//------------------------------------------------------------------------------------------------------------
static int PreferenceFromString( const good::string& sPreference );
/// Get string from bot preference .
static const good::string& PreferenceToString( TBotIntelligence iPreference );
//------------------------------------------------------------------------------------------------------------
/// Get string from bot intelligence.
//------------------------------------------------------------------------------------------------------------
static const good::string& IntelligenceToString( TBotIntelligence iIntelligence );
//------------------------------------------------------------------------------------------------------------
/// Get bot task name.
//------------------------------------------------------------------------------------------------------------
static const good::string& BotTaskToString( TBotTaskHL2DM iBotTask );
//------------------------------------------------------------------------------------------------------------
/// Get bot command from string.
//------------------------------------------------------------------------------------------------------------
static int BotCommandFromString( const good::string& sCommand );
/// Get string from bot command.
static const good::string& BotCommandToString( TBotChat iCommand );
//------------------------------------------------------------------------------------------------------------
/// Get bot action from string.
//------------------------------------------------------------------------------------------------------------
static int BotActionFromString( const good::string& sAction );
/// Get string from bot action.
static const good::string& BotActionToString( int iAction );
//------------------------------------------------------------------------------------------------------------
/// Get string from borzh's task.
//------------------------------------------------------------------------------------------------------------
static const good::string& BorzhTaskToString( int iTask );
};
#endif // __BOTRIX_TYPE_TO_STRING_H__