libzypp  13.10.6
Tr1hash.h File Reference
#include <iosfwd>
#include <tr1/unordered_set>
#include <tr1/unordered_map>

Go to the source code of this file.

Namespaces

 std
 
 std::tr1
 

Macros

#define ZYPP_DEFINE_ID_HASHABLE(C)
 Define hash function for id based classes. More...
 

Functions

template<class _D >
unordered_set< _D > * std::tr1::rwcowClone (const std::tr1::unordered_set< _D > *rhs)
 clone function for RW_pointer More...
 
template<class _K , class _V >
std::tr1::unordered_map< _K, _V > * std::tr1::rwcowClone (const std::tr1::unordered_map< _K, _V > *rhs)
 clone function for RW_pointer More...
 

Macro Definition Documentation

#define ZYPP_DEFINE_ID_HASHABLE (   C)
Value:
namespace std { namespace tr1 { \
template<class _Tp> struct hash; \
template<> struct hash<C> \
{ \
size_t operator()( const C & __s ) const \
{ return __s.id(); } \
}; \
}}

Define hash function for id based classes.

Class has to provide a method id() retuning a unique number.

* // in global namespace define:
* ZYPP_DEFINE_ID_HASHABLE( ::zypp::sat::Sovable )
*

Definition at line 26 of file Tr1hash.h.