LuaHashMap  1.0.0
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Functions
SetValueForKey family of functions

Functions

const char * LuaHashMap_SetValueStringForKeyString (LuaHashMap *restrict hash_map, const char *value_string, const char *key_string)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValueStringForKeyStringWithLength (LuaHashMap *restrict hash_map, const char *value_string, const char *key_string, size_t value_string_length, size_t key_string_length)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValuePointerForKeyString (LuaHashMap *hash_map, void *value_pointer, const char *key_string)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValuePointerForKeyStringWithLength (LuaHashMap *hash_map, void *value_pointer, const char *key_string, size_t key_string_length)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValueNumberForKeyString (LuaHashMap *restrict hash_map, lua_Number value_number, const char *restrict key_string)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValueNumberForKeyStringWithLength (LuaHashMap *restrict hash_map, lua_Number value_number, const char *restrict key_string, size_t key_string_length)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValueIntegerForKeyString (LuaHashMap *restrict hash_map, lua_Integer value_integer, const char *restrict key_string)
 Adds a given key-value pair to the hash table.
 
const char * LuaHashMap_SetValueIntegerForKeyStringWithLength (LuaHashMap *restrict hash_map, lua_Integer value_integer, const char *restrict key_string, size_t key_string_length)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueStringForKeyPointer (LuaHashMap *hash_map, const char *value_string, void *key_pointer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueStringForKeyPointerWithLength (LuaHashMap *hash_map, const char *value_string, void *key_pointer, size_t value_string_length)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValuePointerForKeyPointer (LuaHashMap *hash_map, void *value_pointer, void *key_pointer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueNumberForKeyPointer (LuaHashMap *hash_map, lua_Number value_number, void *key_pointer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueIntegerForKeyPointer (LuaHashMap *hash_map, lua_Integer value_integer, void *key_pointer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueStringForKeyNumber (LuaHashMap *restrict hash_map, const char *restrict value_string, lua_Number key_number)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueStringForKeyNumberWithLength (LuaHashMap *restrict hash_map, const char *restrict value_string, lua_Number key_number, size_t value_string_length)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValuePointerForKeyNumber (LuaHashMap *hash_map, void *value_pointer, lua_Number key_number)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueNumberForKeyNumber (LuaHashMap *hash_map, lua_Number value_number, lua_Number key_number)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueIntegerForKeyNumber (LuaHashMap *hash_map, lua_Integer value_integer, lua_Number key_number)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueStringForKeyInteger (LuaHashMap *restrict hash_map, const char *restrict value_string, lua_Integer key_integer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueStringForKeyIntegerWithLength (LuaHashMap *restrict hash_map, const char *restrict value_string, lua_Integer key_integer, size_t value_string_length)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValuePointerForKeyInteger (LuaHashMap *hash_map, void *value_pointer, lua_Integer key_integer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueNumberForKeyInteger (LuaHashMap *hash_map, lua_Number value_number, lua_Integer key_integer)
 Adds a given key-value pair to the hash table.
 
void LuaHashMap_SetValueIntegerForKeyInteger (LuaHashMap *hash_map, lua_Integer value_integer, lua_Integer key_integer)
 Adds a given key-value pair to the hash table.
 

Detailed Description

Function Documentation

void LuaHashMap_SetValueIntegerForKeyInteger ( LuaHashMap hash_map,
lua_Integer  value_integer,
lua_Integer  key_integer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <integer, integer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_integerThe value for the key.
key_integerThe key for the value.
void LuaHashMap_SetValueIntegerForKeyNumber ( LuaHashMap hash_map,
lua_Integer  value_integer,
lua_Number  key_number 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <number, integer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_integerThe value for the key.
key_numberThe key for the value.
void LuaHashMap_SetValueIntegerForKeyPointer ( LuaHashMap hash_map,
lua_Integer  value_integer,
void *  key_pointer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <pointer, integer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_integerThe value for the key.
key_pointerThe key for the value. NULL key pointers are allowed as legitimate values.
const char* LuaHashMap_SetValueIntegerForKeyString ( LuaHashMap *restrict  hash_map,
lua_Integer  value_integer,
const char *restrict  key_string 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, integer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_integerThe value for the key.
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
const char* LuaHashMap_SetValueIntegerForKeyStringWithLength ( LuaHashMap *restrict  hash_map,
lua_Integer  value_integer,
const char *restrict  key_string,
size_t  key_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, number> version This version allows you to specify the string length for the string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_integerThe value for the key.
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
key_string_lengthThe string length (strlen()) of the key string. (This does not count the \0 terminator character.)
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueIntegerForKeyString
void LuaHashMap_SetValueNumberForKeyInteger ( LuaHashMap hash_map,
lua_Number  value_number,
lua_Integer  key_integer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <integer, number> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_numberThe value for the key.
key_integerThe key for the value.
void LuaHashMap_SetValueNumberForKeyNumber ( LuaHashMap hash_map,
lua_Number  value_number,
lua_Number  key_number 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <number, number> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_numberThe value for the key.
key_numberThe key for the value.
void LuaHashMap_SetValueNumberForKeyPointer ( LuaHashMap hash_map,
lua_Number  value_number,
void *  key_pointer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <pointer, number> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_numberThe value for the key.
key_pointerThe key for the value. NULL key pointers are allowed as legitimate values.
const char* LuaHashMap_SetValueNumberForKeyString ( LuaHashMap *restrict  hash_map,
lua_Number  value_number,
const char *restrict  key_string 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, number> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_numberThe value for the key.
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
const char* LuaHashMap_SetValueNumberForKeyStringWithLength ( LuaHashMap *restrict  hash_map,
lua_Number  value_number,
const char *restrict  key_string,
size_t  key_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, number> version This version allows you to specify the string length for the string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_numberThe value for the key.
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
key_string_lengthThe string length (strlen()) of the key string. (This does not count the \0 terminator character.)
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueNumberForKeyString
void LuaHashMap_SetValuePointerForKeyInteger ( LuaHashMap hash_map,
void *  value_pointer,
lua_Integer  key_integer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <integer, pointer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_pointerThe value for the key. NULL key pointers are allowed as legitimate values.
key_integerThe key for the value.
void LuaHashMap_SetValuePointerForKeyNumber ( LuaHashMap hash_map,
void *  value_pointer,
lua_Number  key_number 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <number, pointer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_pointerThe value for the key. NULL key pointers are allowed as legitimate values.
key_numberThe key for the value.
void LuaHashMap_SetValuePointerForKeyPointer ( LuaHashMap hash_map,
void *  value_pointer,
void *  key_pointer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <pointer, pointer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_pointerThe value for the key. NULL key pointers are allowed as legitimate values.
key_pointerThe key for the value. NULL key pointers are allowed as legitimate values.
const char* LuaHashMap_SetValuePointerForKeyString ( LuaHashMap hash_map,
void *  value_pointer,
const char *  key_string 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, pointer> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_pointerThe value for the key. NULL value pointers are allowed as legitimate values.
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
const char* LuaHashMap_SetValuePointerForKeyStringWithLength ( LuaHashMap hash_map,
void *  value_pointer,
const char *  key_string,
size_t  key_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, pointer> version This version allows you to specify the string length for the string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_pointerThe value for the key. NULL value pointers are allowed as legitimate values.
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
key_string_lengthThe string length (strlen()) of the key string. (This does not count the \0 terminator character.)
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValuePointerForKeyString
void LuaHashMap_SetValueStringForKeyInteger ( LuaHashMap *restrict  hash_map,
const char *restrict  value_string,
lua_Integer  key_integer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <integer, string> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_integerThe key for the value.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
void LuaHashMap_SetValueStringForKeyIntegerWithLength ( LuaHashMap *restrict  hash_map,
const char *restrict  value_string,
lua_Integer  key_integer,
size_t  value_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <integer, string> version This version allows you to specify the string length for the string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_integerThe key for the value.
value_string_lengthThe string length (strlen()) of the value string. (This does not count the \0 terminator character.)
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueStringForKeyInteger
void LuaHashMap_SetValueStringForKeyNumber ( LuaHashMap *restrict  hash_map,
const char *restrict  value_string,
lua_Number  key_number 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <number, string> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_numberThe key for the value.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
void LuaHashMap_SetValueStringForKeyNumberWithLength ( LuaHashMap *restrict  hash_map,
const char *restrict  value_string,
lua_Number  key_number,
size_t  value_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <number, string> version This version allows you to specify the string length for the string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_numberThe key for the value.
value_string_lengthThe string length (strlen()) of the value string. (This does not count the \0 terminator character.)
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueStringForKeyNumber
void LuaHashMap_SetValueStringForKeyPointer ( LuaHashMap hash_map,
const char *  value_string,
void *  key_pointer 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <pointer, string> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_pointerThe key for the value. NULL key pointers are allowed as legitimate values.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
void LuaHashMap_SetValueStringForKeyPointerWithLength ( LuaHashMap hash_map,
const char *  value_string,
void *  key_pointer,
size_t  value_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <pointer, string> version This version allows you to specify the string length for the string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_pointerThe key for the value. NULL key pointers are allowed as legitimate values.
value_string_lengthThe string length (strlen()) of the value string. (This does not count the \0 terminator character.)
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueStringForKeyPointer
const char* LuaHashMap_SetValueStringForKeyString ( LuaHashMap *restrict  hash_map,
const char *  value_string,
const char *  key_string 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, string> version

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueStringForKeyStringWithLength
const char* LuaHashMap_SetValueStringForKeyStringWithLength ( LuaHashMap *restrict  hash_map,
const char *  value_string,
const char *  key_string,
size_t  value_string_length,
size_t  key_string_length 
)

Adds a given key-value pair to the hash table.

Adds or updates a given key-value pair to the hash table. <string, string> version This version allows you to specify the string length for each string if you already know it as an optimization.

Parameters
hash_mapThe LuaHashMap instance to operate on.
value_stringThe value for the key. NULL value strings are treated as strings with length=0 ("").
key_stringThe key for the value. NULL key strings disallowed and the operation will simply return NULL.
value_string_lengthThe string length (strlen()) of the value string. (This does not count the \0 terminator character.)
key_string_lengthThe string length (strlen()) of the key string. (This does not count the \0 terminator character.)
Returns
Returns the the Lua internalized pointer for the key string (which may be different than the one you supplied). Returns NULL on failure.
Note
Lua copies strings and internalizes them. This means Lua/LuaHashMap have its own copy of the string and you are free to delete your string if you are done with it.
See Also
LuaHashMap_SetValueStringForKeyString