|
#include <functional>
#include <boost/functional/hash.hpp>
#include <tuple>
#include <utility>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
Go to the source code of this file.
Classes | |
struct | hash< pair< A, B > > |
Enables hashing of std::pair. More... | |
struct | hash< tuple< Ts... > > |
Enables hashing of std::tuple. More... | |
Namespaces | |
armarx | |
This file offers overloads of toIce() and fromIce() functions for STL container types. | |
std | |
Macros | |
#define | ARMARX_IDENTITY(...) __VA_ARGS__ |
Expands to it's input. More... | |
#define | ARMARX_OVERLOAD_STD_HASH(Type, Members) |
Overloads the std::hash template for Type. More... | |
#define | ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE(TemplateArgs, Type) |
Overloads the std::hash template for a type Type with the member functions begin() and end(). More... | |
#define | ARMARX_STRIP_PARENTHESES(X) ARMARX_IDENTITY X |
Strips the parentheses of an input. More... | |
Functions | |
class | A (deque< T, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T |
Enables hashing of std::list. More... | |
class class | A (list< T, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T |
Enables hashing of std::set. More... | |
class C class | A (map< K, V, C, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class K |
Enables hashing of std::multimap. More... | |
class | A (multiset< T, C, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class K |
Enables hashing of std::map. More... | |
class | A (set< T, C, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T |
Enables hashing of std::multiset. More... | |
ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE ((class T, class A),(vector< T, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T | |
Enables hashing of std::vector. More... | |
template<class T0 > | |
void | do_hash (std::size_t &hashed, const T0 &t0) |
Combines the accumulated hash and the parameters hash. More... | |
template<class T0 , class... Ts> | |
void | do_hash (std::size_t &hashed, const T0 &t0, const Ts &...ts) |
Combines the accumulated hash and the parameters hash. More... | |
template<class... Ts> | |
std::size_t | hash_all (const Ts &...ts) |
Returns the hash of all parameters. More... | |
#define ARMARX_IDENTITY | ( | ... | ) | __VA_ARGS__ |
Expands to it's input.
Definition at line 36 of file HashingUtil.h.
#define ARMARX_OVERLOAD_STD_HASH | ( | Type, | |
Members | |||
) |
Overloads the std::hash template for Type.
If the hash value of type foo depends on the members a and b the call has to be: ARMARX_OVERLOAD_STD_HASH((foo), (arg.a, arg.b)) The parentheses are required!
Definition at line 49 of file HashingUtil.h.
#define ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE | ( | TemplateArgs, | |
Type | |||
) |
Overloads the std::hash template for a type Type with the member functions begin() and end().
If the type depends on some template parameters they can be passed as the first argument. The parentheses around both arguments are required!
examples: for vector<int, AllocatorType> : ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((), (vector<int, AllocatorType>)) for all vectors: ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T, class A), (vector<T, A>))
Definition at line 73 of file HashingUtil.h.
#define ARMARX_STRIP_PARENTHESES | ( | X | ) | ARMARX_IDENTITY X |
Strips the parentheses of an input.
Definition at line 41 of file HashingUtil.h.
class A | ( | deque< T, A > | ) |
Enables hashing of std::list.
class C class A | ( | map< K, V, C, A > | ) |
Enables hashing of std::multimap.
class A | ( | multiset< T, C, A > | ) |
Enables hashing of std::map.