doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
idDict Class Reference

#include <Dict.h>

Public Member Functions

 idDict (void)
 
 idDict (const idDict &other)
 
 ~idDict (void)
 
void SetGranularity (int granularity)
 
void SetHashSize (int hashSize)
 
idDictoperator= (const idDict &other)
 
void Copy (const idDict &other)
 
void TransferKeyValues (idDict &other)
 
bool Parse (idParser &parser)
 
void SetDefaults (const idDict *dict)
 
void Clear (void)
 
void Print () const
 
size_t Allocated (void) const
 
size_t Size (void) const
 
void Set (const char *key, const char *value)
 
void SetFloat (const char *key, float val)
 
void SetInt (const char *key, int val)
 
void SetBool (const char *key, bool val)
 
void SetVector (const char *key, const idVec3 &val)
 
void SetVec2 (const char *key, const idVec2 &val)
 
void SetVec4 (const char *key, const idVec4 &val)
 
void SetAngles (const char *key, const idAngles &val)
 
void SetMatrix (const char *key, const idMat3 &val)
 
const char * GetString (const char *key, const char *defaultString="") const
 
float GetFloat (const char *key, const char *defaultString="0") const
 
int GetInt (const char *key, const char *defaultString="0") const
 
bool GetBool (const char *key, const char *defaultString="0") const
 
idVec3 GetVector (const char *key, const char *defaultString=NULL) const
 
idVec2 GetVec2 (const char *key, const char *defaultString=NULL) const
 
idVec4 GetVec4 (const char *key, const char *defaultString=NULL) const
 
idAngles GetAngles (const char *key, const char *defaultString=NULL) const
 
idMat3 GetMatrix (const char *key, const char *defaultString=NULL) const
 
bool GetString (const char *key, const char *defaultString, const char **out) const
 
bool GetString (const char *key, const char *defaultString, idStr &out) const
 
bool GetFloat (const char *key, const char *defaultString, float &out) const
 
bool GetInt (const char *key, const char *defaultString, int &out) const
 
bool GetBool (const char *key, const char *defaultString, bool &out) const
 
bool GetVector (const char *key, const char *defaultString, idVec3 &out) const
 
bool GetVec2 (const char *key, const char *defaultString, idVec2 &out) const
 
bool GetVec4 (const char *key, const char *defaultString, idVec4 &out) const
 
bool GetAngles (const char *key, const char *defaultString, idAngles &out) const
 
bool GetMatrix (const char *key, const char *defaultString, idMat3 &out) const
 
int GetNumKeyVals (void) const
 
const idKeyValueGetKeyVal (int index) const
 
const idKeyValueFindKey (const char *key) const
 
int FindKeyIndex (const char *key) const
 
void Delete (const char *key)
 
const idKeyValueMatchPrefix (const char *prefix, const idKeyValue *lastMatch=NULL) const
 
const char * RandomPrefix (const char *prefix, idRandom &random) const
 
void WriteToFileHandle (idFile *f) const
 
void ReadFromFileHandle (idFile *f)
 
int Checksum (void) const
 

Static Public Member Functions

static void Init (void)
 
static void Shutdown (void)
 
static void ShowMemoryUsage_f (const idCmdArgs &args)
 
static void ListKeys_f (const idCmdArgs &args)
 
static void ListValues_f (const idCmdArgs &args)
 

Private Attributes

idList< idKeyValueargs
 
idHashIndex argHash
 

Static Private Attributes

static idStrPool globalKeys
 
static idStrPool globalValues
 

Detailed Description

Definition at line 65 of file Dict.h.

Constructor & Destructor Documentation

ID_INLINE idDict::idDict ( void  )

Definition at line 163 of file Dict.h.

ID_INLINE idDict::idDict ( const idDict other)

Definition at line 169 of file Dict.h.

ID_INLINE idDict::~idDict ( void  )

Definition at line 173 of file Dict.h.

Member Function Documentation

size_t idDict::Allocated ( void  ) const

Definition at line 258 of file Dict.cpp.

int idDict::Checksum ( void  ) const

Definition at line 237 of file Dict.cpp.

void idDict::Clear ( void  )

Definition at line 201 of file Dict.cpp.

void idDict::Copy ( const idDict other)

Definition at line 70 of file Dict.cpp.

void idDict::Delete ( const char *  key)

Definition at line 496 of file Dict.cpp.

const idKeyValue * idDict::FindKey ( const char *  key) const

Definition at line 451 of file Dict.cpp.

int idDict::FindKeyIndex ( const char *  key) const

Definition at line 474 of file Dict.cpp.

ID_INLINE idAngles idDict::GetAngles ( const char *  key,
const char *  defaultString = NULL 
) const

Definition at line 278 of file Dict.h.

bool idDict::GetAngles ( const char *  key,
const char *  defaultString,
idAngles out 
) const

Definition at line 343 of file Dict.cpp.

ID_INLINE bool idDict::GetBool ( const char *  key,
const char *  defaultString = "0" 
) const

Definition at line 256 of file Dict.h.

bool idDict::GetBool ( const char *  key,
const char *  defaultString,
bool out 
) const

Definition at line 329 of file Dict.cpp.

ID_INLINE float idDict::GetFloat ( const char *  key,
const char *  defaultString = "0" 
) const

Definition at line 248 of file Dict.h.

bool idDict::GetFloat ( const char *  key,
const char *  defaultString,
float out 
) const

Definition at line 301 of file Dict.cpp.

ID_INLINE int idDict::GetInt ( const char *  key,
const char *  defaultString = "0" 
) const

Definition at line 252 of file Dict.h.

bool idDict::GetInt ( const char *  key,
const char *  defaultString,
int out 
) const

Definition at line 315 of file Dict.cpp.

ID_INLINE const idKeyValue * idDict::GetKeyVal ( int  index) const

Definition at line 294 of file Dict.h.

ID_INLINE idMat3 idDict::GetMatrix ( const char *  key,
const char *  defaultString = NULL 
) const

Definition at line 284 of file Dict.h.

bool idDict::GetMatrix ( const char *  key,
const char *  defaultString,
idMat3 out 
) const

Definition at line 419 of file Dict.cpp.

ID_INLINE int idDict::GetNumKeyVals ( void  ) const

Definition at line 290 of file Dict.h.

ID_INLINE const char * idDict::GetString ( const char *  key,
const char *  defaultString = "" 
) const

Definition at line 240 of file Dict.h.

ID_INLINE bool idDict::GetString ( const char *  key,
const char *  defaultString,
const char **  out 
) const

Definition at line 220 of file Dict.h.

ID_INLINE bool idDict::GetString ( const char *  key,
const char *  defaultString,
idStr out 
) const

Definition at line 230 of file Dict.h.

ID_INLINE idVec2 idDict::GetVec2 ( const char *  key,
const char *  defaultString = NULL 
) const

Definition at line 266 of file Dict.h.

bool idDict::GetVec2 ( const char *  key,
const char *  defaultString,
idVec2 out 
) const

Definition at line 381 of file Dict.cpp.

ID_INLINE idVec4 idDict::GetVec4 ( const char *  key,
const char *  defaultString = NULL 
) const

Definition at line 272 of file Dict.h.

bool idDict::GetVec4 ( const char *  key,
const char *  defaultString,
idVec4 out 
) const

Definition at line 400 of file Dict.cpp.

ID_INLINE idVec3 idDict::GetVector ( const char *  key,
const char *  defaultString = NULL 
) const

Definition at line 260 of file Dict.h.

bool idDict::GetVector ( const char *  key,
const char *  defaultString,
idVec3 out 
) const

Definition at line 362 of file Dict.cpp.

void idDict::Init ( void  )
static

Definition at line 627 of file Dict.cpp.

void idDict::ListKeys_f ( const idCmdArgs args)
static

Definition at line 668 of file Dict.cpp.

void idDict::ListValues_f ( const idCmdArgs args)
static

Definition at line 687 of file Dict.cpp.

const idKeyValue * idDict::MatchPrefix ( const char *  prefix,
const idKeyValue lastMatch = NULL 
) const

Definition at line 523 of file Dict.cpp.

idDict & idDict::operator= ( const idDict other)

Definition at line 42 of file Dict.cpp.

bool idDict::Parse ( idParser parser)

Definition at line 142 of file Dict.cpp.

void idDict::Print ( void  ) const

Definition at line 218 of file Dict.cpp.

const char * idDict::RandomPrefix ( const char *  prefix,
idRandom random 
) const

Definition at line 553 of file Dict.cpp.

void idDict::ReadFromFileHandle ( idFile f)

Definition at line 607 of file Dict.cpp.

void idDict::Set ( const char *  key,
const char *  value 
)

Definition at line 275 of file Dict.cpp.

ID_INLINE void idDict::SetAngles ( const char *  key,
const idAngles val 
)

Definition at line 212 of file Dict.h.

ID_INLINE void idDict::SetBool ( const char *  key,
bool  val 
)

Definition at line 196 of file Dict.h.

void idDict::SetDefaults ( const idDict dict)

Definition at line 179 of file Dict.cpp.

ID_INLINE void idDict::SetFloat ( const char *  key,
float  val 
)

Definition at line 188 of file Dict.h.

ID_INLINE void idDict::SetGranularity ( int  granularity)

Definition at line 177 of file Dict.h.

ID_INLINE void idDict::SetHashSize ( int  hashSize)

Definition at line 182 of file Dict.h.

ID_INLINE void idDict::SetInt ( const char *  key,
int  val 
)

Definition at line 192 of file Dict.h.

ID_INLINE void idDict::SetMatrix ( const char *  key,
const idMat3 val 
)

Definition at line 216 of file Dict.h.

ID_INLINE void idDict::SetVec2 ( const char *  key,
const idVec2 val 
)

Definition at line 208 of file Dict.h.

ID_INLINE void idDict::SetVec4 ( const char *  key,
const idVec4 val 
)

Definition at line 204 of file Dict.h.

ID_INLINE void idDict::SetVector ( const char *  key,
const idVec3 val 
)

Definition at line 200 of file Dict.h.

void idDict::ShowMemoryUsage_f ( const idCmdArgs args)
static

Definition at line 647 of file Dict.cpp.

void idDict::Shutdown ( void  )
static

Definition at line 637 of file Dict.cpp.

size_t idDict::Size ( void  ) const
inline

Definition at line 91 of file Dict.h.

void idDict::TransferKeyValues ( idDict other)

Definition at line 111 of file Dict.cpp.

void idDict::WriteToFileHandle ( idFile f) const

Definition at line 571 of file Dict.cpp.

Member Data Documentation

idHashIndex idDict::argHash
private

Definition at line 156 of file Dict.h.

idList<idKeyValue> idDict::args
private

Definition at line 155 of file Dict.h.

idStrPool idDict::globalKeys
staticprivate

Definition at line 158 of file Dict.h.

idStrPool idDict::globalValues
staticprivate

Definition at line 159 of file Dict.h.


The documentation for this class was generated from the following files: