LuaHashMap  1.0.0
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Macros
C11 _Generic Macros

Macros

#define LuaHashMap_SetValueForKey(hash_map, value, key)
 LuaHashMap_SetValueForKey.
 
#define LuaHashMap_SetValueForKeyWithLength(hash_map, value, key, strlength)
 LuaHashMap_SetValueForKeyWithLength.
 
#define LuaHashMap_SetValueAtIterator(hash_iterator, value)
 LuaHashMap_SetValueAtIterator.
 
#define LuaHashMap_SetValue(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_SETVALUE_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_SetValue.
 
#define LuaHashMap_GetValueStringForKey(hash_map, key)
 LuaHashMap_GetValueStringForKey.
 
#define LuaHashMap_GetValueStringForKeyWithLength(hash_map, key, strlengthoutptr)
 LuaHashMap_GetValueStringForKeyWithLength.
 
#define LuaHashMap_GetValueString(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUESTRING_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_GetValueString.
 
#define LuaHashMap_GetValuePointerForKey(hash_map, key)
 LuaHashMap_GetValuePointerForKey.
 
#define LuaHashMap_GetValueNumberForKey(hash_map, key)
 LuaHashMap_GetValueNumberForKey.
 
#define LuaHashMap_GetValueIntegerForKey(hash_map, key)
 LuaHashMap_GetValueIntegerForKey.
 
#define LuaHashMap_GetValuePointer(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUEPOINTER_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_GetValuePointer.
 
#define LuaHashMap_GetValueNumber(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUENUMBER_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_GetValueNumber.
 
#define LuaHashMap_GetValueInteger(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUEINTEGER_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_GetValueInteger.
 
#define LuaHashMap_ExistsKey(hash_map, key)
 LuaHashMap_ExistsKey.
 
#define LuaHashMap_Exists(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_EXISTS_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_Exists.
 
#define LuaHashMap_RemoveKey(hash_map, key)
 LuaHashMap_RemoveKey.
 
#define LuaHashMap_Remove(...)   LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_REMOVE_, __VA_ARGS__)(__VA_ARGS__)
 LuaHashMap_Remove.
 
#define LuaHashMap_GetIteratorForKey(hash_map, key)
 LuaHashMap_GetIteratorForKey.
 
#define LUAHASHMAP_SUPPORTS_GENERICS   1
 Defined only if C11 _Generic support has been detected.
 

Detailed Description

Macro Definition Documentation

#define LuaHashMap_Exists (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_EXISTS_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_Exists.

This C11 _Generic macro essentially overloads all the LuaHashMap_ExistsKey and LuaHashMap_ExistsAtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_ExistsKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_ExistsKeyString, \
double: LuaHashMap_ExistsKeyNumber, \
long double: LuaHashMap_ExistsKeyNumber, \
unsigned char: LuaHashMap_ExistsKeyInteger, \
short: LuaHashMap_ExistsKeyInteger, \
unsigned short: LuaHashMap_ExistsKeyInteger, \
int: LuaHashMap_ExistsKeyInteger, \
unsigned int: LuaHashMap_ExistsKeyInteger, \
long: LuaHashMap_ExistsKeyInteger, \
unsigned long: LuaHashMap_ExistsKeyInteger, \
default: LuaHashMap_ExistsKeyPointer) \
) \
(hash_map, key)

LuaHashMap_ExistsKey.

This C11 _Generic macro essentially overloads all the 2 parameter LuaHashMap_ExistsKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetIteratorForKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_GetIteratorForKeyString, \
double: LuaHashMap_GetIteratorForKeyNumber, \
long double: LuaHashMap_GetIteratorForKeyNumber, \
unsigned char: LuaHashMap_GetIteratorForKeyInteger, \
short: LuaHashMap_GetIteratorForKeyInteger, \
unsigned short: LuaHashMap_GetIteratorForKeyInteger, \
int: LuaHashMap_GetIteratorForKeyInteger, \
unsigned int: LuaHashMap_GetIteratorForKeyInteger, \
long: LuaHashMap_GetIteratorForKeyInteger, \
unsigned long: LuaHashMap_GetIteratorForKeyInteger, \
default: LuaHashMap_GetIteratorForKeyPointer) \
) \
(hash_map, key)

LuaHashMap_GetIteratorForKey.

This C11 _Generic macro essentially overloads all the 2 parameter LuaHashMap_GetIteratorForKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueInteger (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUEINTEGER_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_GetValueInteger.

This C11 _Generic macro essentially overloads all LuaHashMap_GetValueIntegerForKey and LuaHashMap_GetValueIntegerAtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueIntegerForKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_GetValueIntegerForKeyString, \
double: LuaHashMap_GetValueIntegerForKeyNumber, \
long double: LuaHashMap_GetValueIntegerForKeyNumber, \
unsigned char: LuaHashMap_GetValueIntegerForKeyInteger, \
short: LuaHashMap_GetValueIntegerForKeyInteger, \
unsigned short: LuaHashMap_GetValueIntegerForKeyInteger, \
int: LuaHashMap_GetValueIntegerForKeyInteger, \
unsigned int: LuaHashMap_GetValueIntegerForKeyInteger, \
long: LuaHashMap_GetValueIntegerForKeyInteger, \
unsigned long: LuaHashMap_GetValueIntegerForKeyInteger, \
default: LuaHashMap_GetValueIntegerForKeyPointer) \
) \
(hash_map, key)

LuaHashMap_GetValueIntegerForKey.

This C11 _Generic macro essentially overloads all the 2 parameter GetValueIntegerForKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueNumber (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUENUMBER_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_GetValueNumber.

This C11 _Generic macro essentially overloads all LuaHashMap_GetValueNumberForKey and LuaHashMap_GetValueNumberAtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueNumberForKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_GetValueNumberForKeyString, \
double: LuaHashMap_GetValueNumberForKeyNumber, \
long double: LuaHashMap_GetValueNumberForKeyNumber, \
unsigned char: LuaHashMap_GetValueNumberForKeyInteger, \
short: LuaHashMap_GetValueNumberForKeyInteger, \
unsigned short: LuaHashMap_GetValueNumberForKeyInteger, \
int: LuaHashMap_GetValueNumberForKeyInteger, \
unsigned int: LuaHashMap_GetValueNumberForKeyInteger, \
long: LuaHashMap_GetValueNumberForKeyInteger, \
unsigned long: LuaHashMap_GetValueNumberForKeyInteger, \
default: LuaHashMap_GetValueNumberForKeyPointer) \
) \
(hash_map, key)

LuaHashMap_GetValueNumberForKey.

This C11 _Generic macro essentially overloads all the 2 parameter GetValueNumberForKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValuePointer (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUEPOINTER_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_GetValuePointer.

This C11 _Generic macro essentially overloads all LuaHashMap_GetValuePointerForKey and LuaHashMap_GetValuePointerAtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValuePointerForKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_GetValuePointerForKeyString, \
double: LuaHashMap_GetValuePointerForKeyNumber, \
long double: LuaHashMap_GetValuePointerForKeyNumber, \
unsigned char: LuaHashMap_GetValuePointerForKeyInteger, \
short: LuaHashMap_GetValuePointerForKeyInteger, \
unsigned short: LuaHashMap_GetValuePointerForKeyInteger, \
int: LuaHashMap_GetValuePointerForKeyInteger, \
unsigned int: LuaHashMap_GetValuePointerForKeyInteger, \
long: LuaHashMap_GetValuePointerForKeyInteger, \
unsigned long: LuaHashMap_GetValuePointerForKeyInteger, \
default: LuaHashMap_GetValuePointerForKeyPointer) \
) \
(hash_map, key)

LuaHashMap_GetValuePointerForKey.

This C11 _Generic macro essentially overloads all the 2 parameter GetValuePointerForKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueString (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_GETVALUESTRING_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_GetValueString.

This C11 _Generic macro essentially overloads all LuaHashMap_GetValueStringForKey and LuaHashMap_GetValueStringAtIterator functions including the WithLength varitions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueStringForKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_GetValueStringForKeyString, \
double: LuaHashMap_GetValueStringForKeyNumber, \
long double: LuaHashMap_GetValueStringForKeyNumber, \
unsigned char: LuaHashMap_GetValueStringForKeyInteger, \
short: LuaHashMap_GetValueStringForKeyInteger, \
unsigned short: LuaHashMap_GetValueStringForKeyInteger, \
int: LuaHashMap_GetValueStringForKeyInteger, \
unsigned int: LuaHashMap_GetValueStringForKeyInteger, \
long: LuaHashMap_GetValueStringForKeyInteger, \
unsigned long: LuaHashMap_GetValueStringForKeyInteger, \
default: LuaHashMap_GetValueStringForKeyPointer) \
) \
(hash_map, key)

LuaHashMap_GetValueStringForKey.

This C11 _Generic macro essentially overloads all the 2 parameter GetValueStringForKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_GetValueStringForKeyWithLength (   hash_map,
  key,
  strlengthoutptr 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
void*: _Generic((strlengthoutptr), \
float: _Generic((strlengthoutptr), \
double: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyNumberWithLength), \
long double: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyNumberWithLength), \
char: _Generic((strlengthoutptr), \
unsigned char: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength), \
short: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength), \
unsigned short: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength), \
int: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength), \
unsigned int: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength), \
long: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength), \
unsigned long: _Generic((strlengthoutptr), \
size_t*: LuaHashMap_GetValueStringForKeyIntegerWithLength) \
) \
) \
(hash_map, key, strlengthoutptr)

LuaHashMap_GetValueStringForKeyWithLength.

This C11 _Generic macro essentially overloads all the 3 parameter GetValueStringForKey<T>WithLength functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_Remove (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_REMOVE_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_Remove.

This C11 _Generic macro essentially overloads all the LuaHashMap_RemoveKey and LuaHashMap_RemoveAtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_RemoveKey (   hash_map,
  key 
)
Value:
_Generic((hash_map), LuaHashMap*: _Generic((key), \
char*: LuaHashMap_RemoveKeyString, \
double: LuaHashMap_RemoveKeyNumber, \
long double: LuaHashMap_RemoveKeyNumber, \
unsigned char: LuaHashMap_RemoveKeyInteger, \
short: LuaHashMap_RemoveKeyInteger, \
unsigned short: LuaHashMap_RemoveKeyInteger, \
int: LuaHashMap_RemoveKeyInteger, \
unsigned int: LuaHashMap_RemoveKeyInteger, \
long: LuaHashMap_RemoveKeyInteger, \
unsigned long: LuaHashMap_RemoveKeyInteger, \
default: LuaHashMap_RemoveKeyPointer) \
) \
(hash_map, key)

LuaHashMap_RemoveKey.

This C11 _Generic macro essentially overloads all the 2 parameter LuaHashMap_RemoveKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_SetValue (   ...)    LUAHASHMAP_MACRO_DISPATCHER(LUAHASHMAP_SETVALUE_, __VA_ARGS__)(__VA_ARGS__)

LuaHashMap_SetValue.

This C11 _Generic macro essentially overloads all the LuaHashMap_SetValueForKey and LuaHashMap_SetValueAtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_SetValueAtIterator (   hash_iterator,
  value 
)
Value:
_Generic((hash_iterator), LuaHashMapIterator*: _Generic((value), \
char*: LuaHashMap_SetValueStringAtIterator, \
double: LuaHashMap_SetValueNumberAtIterator, \
long double: LuaHashMap_SetValueNumberAtIterator, \
unsigned char: LuaHashMap_SetValueIntegerAtIterator, \
short: LuaHashMap_SetValueIntegerAtIterator, \
unsigned short: LuaHashMap_SetValueIntegerAtIterator, \
int: LuaHashMap_SetValueIntegerAtIterator, \
unsigned int: LuaHashMap_SetValueIntegerAtIterator, \
long: LuaHashMap_SetValueIntegerAtIterator, \
unsigned long: LuaHashMap_SetValueIntegerAtIterator, \
default: LuaHashMap_SetValuePointerAtIterator) \
) \
(hash_iterator, value)

LuaHashMap_SetValueAtIterator.

This C11 _Generic macro essentially overloads all the 2 parameter LuaHashMap_SetValue<T>AtIterator functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_SetValueForKey (   hash_map,
  value,
  key 
)

LuaHashMap_SetValueForKey.

This C11 _Generic macro essentially overloads all the 3 parameter SetValue<T>ForKey<T> functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
#define LuaHashMap_SetValueForKeyWithLength (   hash_map,
  value,
  key,
  strlength 
)

LuaHashMap_SetValueForKeyWithLength.

This C11 _Generic macro essentially overloads all the 4 parameter SetValue<T>ForKey<T>WithLength functions so you can call any permutation with this single macro.

Warning
String literals are technically of type const char[] and not const char* so you must explicitly cast or the fallback/default case will resolve to the Pointer version instead of the String version.
Note
I've been trying to pull the remaining default clauses out of this, but can't figure out how to do it without causing compile problems.
#define LUAHASHMAP_SUPPORTS_GENERICS   1

Defined only if C11 _Generic support has been detected.

You may use this to test to see if generics are supported so you don't have to reproduce my test.