Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
HashIndexed< BA, IMP > Struct Template Reference

#include "lib/hash-indexed.hpp"

Description

template<class BA, class IMP>
struct lib::HashIndexed< BA, IMP >

A Mixin to add a private ID type to the target class, together with storage to hold an instance of this ID, getter and setter, and a templated version of the ID type which can be used to pass specific subclass type info.

Definition at line 135 of file hash-indexed.hpp.

Public Member Functions

void assignID (HashIndexed const &ref)
 
ID const & getID () const
 
template<typename T >
Id< T > const & recastID () const
 redefining of the specific type info of the Id is allowed, as all share the same implementation More...
 

Classes

struct  Id
 Hash based ID, typed to a specific subclass of BA. More...
 
struct  ID
 generic hash based ID, corresponding to the base class BA More...
 
struct  UseEmbeddedHash
 enables use of BA objects as keys within tr1::unordered_map More...
 
struct  UseHashID
 trivial hash functor using the ID as hash More...
 

Friends

bool operator!= (HashIndexed const &hal, HashIndexed const &har)
 
bool operator== (HashIndexed const &hal, HashIndexed const &har)
 equality comparison delegated to the ID implementation More...
 

Protected Member Functions

 HashIndexed ()
 
 HashIndexed (IMP const &iref)
 

Private Attributes

ID id_
 

Constructor & Destructor Documentation

HashIndexed ( )
inlineprotected

Definition at line 201 of file hash-indexed.hpp.

HashIndexed ( IMP const &  iref)
inlineprotected

Definition at line 202 of file hash-indexed.hpp.

Member Function Documentation

ID const& getID ( ) const
inline

Definition at line 175 of file hash-indexed.hpp.

Referenced by HashIndexed< Placement< MObject >, lib::hash::LuidH >::assignID(), HashIndexed_test::checkBasicProperties(), TestB::operator==(), and HashIndexed< Placement< MObject >, lib::hash::LuidH >::recastID().

+ Here is the caller graph for this function:

Id<T> const& recastID ( ) const
inline

redefining of the specific type info of the Id is allowed, as all share the same implementation

Definition at line 184 of file hash-indexed.hpp.

void assignID ( HashIndexed< BA, IMP > const &  ref)
inline

Definition at line 190 of file hash-indexed.hpp.

Member Data Documentation

Friends And Related Function Documentation

bool operator== ( HashIndexed< BA, IMP > const &  hal,
HashIndexed< BA, IMP > const &  har 
)
friend

equality comparison delegated to the ID implementation

Definition at line 196 of file hash-indexed.hpp.

bool operator!= ( HashIndexed< BA, IMP > const &  hal,
HashIndexed< BA, IMP > const &  har 
)
friend

Definition at line 197 of file hash-indexed.hpp.

+ Inheritance diagram for HashIndexed< BA, IMP >:
+ Collaboration diagram for HashIndexed< BA, IMP >:

The documentation for this struct was generated from the following file: