Cyber Garage Portable Runtime (CGPR) for C
dictionary.c File Reference

Functions

CGDictionarycg_dictionary_new (void)
 
void cg_dictionary_delete (CGDictionary *dictionaryList)
 
CGDictionaryElementcg_dictionary_getelement (CGDictionary *dir, const char *key)
 
void cg_dictionary_setvalue (CGDictionary *dir, const char *key, const char *value)
 
const char * cg_dictionary_getvalue (CGDictionary *dir, const char *key)
 

Function Documentation

◆ cg_dictionary_delete()

void cg_dictionary_delete ( CGDictionary * dir)

Destroy a dictionary list

Parameters
dirThe dictionary list in question

◆ cg_dictionary_getelement()

CGDictionaryElement * cg_dictionary_getelement ( CGDictionary * dir,
const char * key )

◆ cg_dictionary_getvalue()

const char * cg_dictionary_getvalue ( CGDictionary * dir,
const char * key )

Get a value of the specified key

Parameters
dirThe dictionary list in question
keyName to search.
Returns
Value of the specified key.

◆ cg_dictionary_new()

CGDictionary * cg_dictionary_new ( void )

Create a new dictionary list

Returns
Dictionary list

◆ cg_dictionary_setvalue()

void cg_dictionary_setvalue ( CGDictionary * dir,
const char * key,
const char * value )

Set a new element into a dictionary

Parameters
dirThe dictionary list in question
keyName to set.
valueValue to set.