93 void Set(
const char *key,
const char *
value );
94 void SetFloat(
const char *key,
float val );
95 void SetInt(
const char *key,
int val );
96 void SetBool(
const char *key,
bool val );
104 const char *
GetString(
const char *key,
const char *defaultString =
"" )
const;
105 float GetFloat(
const char *key,
const char *defaultString =
"0" )
const;
106 int GetInt(
const char *key,
const char *defaultString =
"0" )
const;
107 bool GetBool(
const char *key,
const char *defaultString =
"0" )
const;
114 bool GetString(
const char *key,
const char *defaultString,
const char **out )
const;
115 bool GetString(
const char *key,
const char *defaultString,
idStr &out )
const;
116 bool GetFloat(
const char *key,
const char *defaultString,
float &out )
const;
117 bool GetInt(
const char *key,
const char *defaultString,
int &out )
const;
118 bool GetBool(
const char *key,
const char *defaultString,
bool &out )
const;
119 bool GetVector(
const char *key,
const char *defaultString,
idVec3 &out )
const;
120 bool GetVec2(
const char *key,
const char *defaultString,
idVec2 &out )
const;
121 bool GetVec4(
const char *key,
const char *defaultString,
idVec4 &out )
const;
122 bool GetAngles(
const char *key,
const char *defaultString,
idAngles &out )
const;
123 bool GetMatrix(
const char *key,
const char *defaultString,
idMat3 &out )
const;
134 void Delete(
const char *key );
147 static void Init(
void );
189 Set( key,
va(
"%f", val ) );
193 Set( key,
va(
"%i", val ) );
197 Set( key,
va(
"%i", val ) );
220 ID_INLINE
bool idDict::GetString(
const char *key,
const char *defaultString,
const char **out )
const {
226 *out = defaultString;
245 return defaultString;
249 return atof(
GetString( key, defaultString ) );
252 ID_INLINE
int idDict::GetInt(
const char *key,
const char *defaultString )
const {
253 return atoi(
GetString( key, defaultString ) );
257 return ( atoi(
GetString( key, defaultString ) ) != 0 );
268 GetVec2( key, defaultString, out );
274 GetVec4( key, defaultString, out );
295 if ( index >= 0 && index <
args.
Num() ) {
float GetFloat(const char *key, const char *defaultString="0") const
GLsizei const GLfloat * value
int GetInt(const char *key, const char *defaultString="0") const
void TransferKeyValues(idDict &other)
void Delete(const char *key)
const char * ToString(int precision=2) const
const idStr & GetKey(void) const
static void ListKeys_f(const idCmdArgs &args)
const char * ToString(int precision=2) const
static idStrPool globalValues
idAngles GetAngles(const char *key, const char *defaultString=NULL) const
int FindKeyIndex(const char *key) const
const idKeyValue * MatchPrefix(const char *prefix, const idKeyValue *lastMatch=NULL) const
void SetGranularity(int newgranularity)
void WriteToFileHandle(idFile *f) const
idVec2 GetVec2(const char *key, const char *defaultString=NULL) const
void Set(const char *key, const char *value)
const char * ToString(int precision=2) const
void SetFloat(const char *key, float val)
void Copy(const idDict &other)
void SetGranularity(const int newGranularity)
size_t Allocated(void) const
void ReadFromFileHandle(idFile *f)
idList< idKeyValue > args
static void ListValues_f(const idCmdArgs &args)
const char * GetString(const char *key, const char *defaultString="") const
void SetDefaults(const idDict *dict)
void SetAngles(const char *key, const idAngles &val)
idVec4 GetVec4(const char *key, const char *defaultString=NULL) const
void SetVec2(const char *key, const idVec2 &val)
bool GetBool(const char *key, const char *defaultString="0") const
idVec3 GetVector(const char *key, const char *defaultString=NULL) const
const char * ToString(int precision=2) const
bool Parse(idParser &parser)
static void ShowMemoryUsage_f(const idCmdArgs &args)
const idStr & GetValue(void) const
void SetBool(const char *key, bool val)
const idKeyValue * FindKey(const char *key) const
static idStrPool globalKeys
void SetHashSize(int hashSize)
const char * ToString(int precision=2) const
bool operator==(const idKeyValue &kv) const
void SetGranularity(int granularity)
void SetInt(const char *key, int val)
const char * RandomPrefix(const char *prefix, idRandom &random) const
const idKeyValue * GetKeyVal(int index) const
void SetVec4(const char *key, const idVec4 &val)
static void Shutdown(void)
idMat3 GetMatrix(const char *key, const char *defaultString=NULL) const
char * va(const char *fmt,...)
size_t Allocated(void) const
size_t Allocated(void) const
int GetNumKeyVals(void) const
void SetVector(const char *key, const idVec3 &val)
idDict & operator=(const idDict &other)
void SetMatrix(const char *key, const idMat3 &val)