Turok
 
Loading...
Searching...
No Matches
kDict Class Reference

Editable Dictionary object that holds keys and values. More...

Public Member Functions

void Add (const kStr &in key, const kStr &in value)
 Adds a new key/value.
 
void Empty ()
 Removes all keys/values.
 
void SetValue (const kStr &in key, const kStr &in value)
 Sets the value for the specified key.
 
const bool HasKey (const kStr &in key)
 Returns true if key exists.
 
bool GetFloat (const kStr &in key, float &out floatResult, const float defaultValue=0)
 Returns true if found the key as a float type.
 
bool GetInt (const kStr &in key, int &out intResult, const int defaultValue=0)
 Returns true if found the key as a int type.
 
bool GetBool (const kStr &in key, bool &out boolResult, const bool defaultValue=false)
 Returns true if found the key as a bool type.
 
bool GetString (const kStr &in key, kStr &out stringResult)
 Returns true if found the key as a kStr type.
 
bool GetVector (const kStr &in key, kVec3 &out vectorResult)
 Returns true if found the key as a kVec3 type.
 

Detailed Description

Editable Dictionary object that holds keys and values.

Definition at line 885 of file t1_scriptAPI.cpp.

Member Function Documentation

◆ Add()

void kDict::Add ( const kStr &in key,
const kStr &in value )

Adds a new key/value.

◆ Empty()

void kDict::Empty ( )

Removes all keys/values.

◆ GetBool()

bool kDict::GetBool ( const kStr &in key,
bool &out boolResult,
const bool defaultValue = false )

Returns true if found the key as a bool type.

◆ GetFloat()

bool kDict::GetFloat ( const kStr &in key,
float &out floatResult,
const float defaultValue = 0 )

Returns true if found the key as a float type.

◆ GetInt()

bool kDict::GetInt ( const kStr &in key,
int &out intResult,
const int defaultValue = 0 )

Returns true if found the key as a int type.

◆ GetString()

bool kDict::GetString ( const kStr &in key,
kStr &out stringResult )

Returns true if found the key as a kStr type.

◆ GetVector()

bool kDict::GetVector ( const kStr &in key,
kVec3 &out vectorResult )

Returns true if found the key as a kVec3 type.

◆ HasKey()

const bool kDict::HasKey ( const kStr &in key)

Returns true if key exists.

◆ SetValue()

void kDict::SetValue ( const kStr &in key,
const kStr &in value )

Sets the value for the specified key.