Open Lighting Architecture
0.9.4
|
Helper functions for STL classes.
Go to the source code of this file.
Namespaces | |
namespace | ola |
The namespace containing all OLA symbols. |
Functions | |
template<typename T > | |
void | ola::STLEmptyStack (T *stack) |
Clear a stack. | |
template<typename T > | |
void | ola::STLEmptyStackAndDelete (T *stack) |
Clear a stack and delete all pointers.. | |
template<typename T > | |
void | ola::STLDeleteElements (T *sequence) |
Delete the elements of a Sequence. | |
template<typename T > | |
void | ola::STLDeleteValues (T *container) |
template<typename T1 , typename T2 > | |
bool | ola::STLContains (const T1 &container, const T2 &value) |
template<typename T1 > | |
void | ola::STLKeys (const T1 &container, std::vector< typename T1::key_type > *keys) |
template<typename T1 , typename T2 > | |
void | ola::STLValues (const T1 &container, std::vector< T2 > *values) |
Extract a vector of values from a pair associative container. | |
template<typename T1 > | |
T1::mapped_type * | ola::STLFind (T1 *container, const typename T1::key_type &key) |
Lookup a value by key in a associative container. | |
template<typename T1 > | |
T1::mapped_type const * | ola::STLFind (const T1 *container, const typename T1::key_type &key) |
Lookup a value by key in a associative container. | |
template<typename T1 > | |
T1::mapped_type | ola::STLFindOrNull (const T1 &container, const typename T1::key_type &key) |
Lookup a value by key in a associative container. | |
template<typename T1 > | |
bool | ola::STLReplace (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value) |
Replace a value in a pair associative container, inserting the key, value if it doesn't already exist. | |
template<typename T1 > | |
T1::mapped_type | ola::STLReplacePtr (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value) |
Replace a value in a pair associative container. If the key existed, the old value is returned, otherwise NULL is returned. | |
template<typename T1 > | |
bool | ola::STLReplaceAndDelete (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value) |
Similar to STLReplace but this will delete the value if the replacement occurs. | |
template<typename T1 > | |
bool | ola::STLInsertIfNotPresent (T1 *container, const typename T1::value_type &key_value) |
Insert a value into a container only if this value doesn't already exist. | |
template<typename T1 > | |
bool | ola::STLInsertIfNotPresent (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value) |
Insert a value into a container only if this value doesn't already exist. | |
template<typename T1 > | |
void | ola::STLInsertOrDie (T1 *container, const typename T1::key_type &key, const typename T1::mapped_type &value) |
Insert an key : value into a pair associative container, or abort the program if the key already exists. | |
template<typename T1 > | |
bool | ola::STLRemove (T1 *container, const typename T1::key_type &key) |
Remove a key / value from a container. | |
template<typename T1 > | |
bool | ola::STLLookupAndRemove (T1 *container, const typename T1::key_type &key, typename T1::mapped_type *value) |
Lookup and remove a key from a pair associative container. | |
template<typename T1 > | |
T1::iterator | ola::STLLookupOrInsertNull (T1 *container, const typename T1::key_type &key) |
Lookup or insert a NULL value into a pair associative container. | |
template<typename T1 > | |
bool | ola::STLRemoveAndDelete (T1 *container, const typename T1::key_type &key) |
Remove a value from a pair associative container and delete it. | |
template<typename T1 > | |
T1::mapped_type | ola::STLLookupAndRemovePtr (T1 *container, const typename T1::key_type &key) |
Remove a value from a pair associative container and return the value. | |
template<typename T1 , typename T2 > | |
void | ola::STLMapFromKeys (T1 *output, const T2 input, typename T1::mapped_type value) |