Lumiera  0.pre.03
»edit your freedom«
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
 

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 std::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
 

Protected Member Functions

 HashIndexed (IMP const &iref)
 

Private Attributes

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

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