Rosetta 3.3
Classes | Namespaces | Functions
src/utility/keys/AutoKey.hh File Reference

Automatic hidden index key abstract base class. More...

#include <utility/keys/AutoKey.fwd.hh>
#include <utility/down_cast.hh>
#include <utility/keys/Key.hh>
#include <utility/keys/KeyLookup.hh>
#include <utility/keys/NoClient.hh>
#include <cassert>

Classes

class  utility::keys::AutoKey< O, S, C >
 Automatic hidden index key abstract base class. More...

Namespaces

namespace  utility
 

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.


namespace  utility::keys
 

Keys and key-accessed containers for fast, safe object lookup.


Functions

template<typename O , typename S , typename C >
bool utility::keys::operator== (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKey == AutoKey.
template<typename O , typename S , typename C >
bool utility::keys::operator!= (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKey != AutoKey.
template<typename O , typename S , typename C >
bool utility::keys::operator< (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKey < AutoKey.
template<typename O , typename S , typename C >
bool utility::keys::operator<= (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKey <= AutoKey.
template<typename O , typename S , typename C >
bool utility::keys::operator>= (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKey >= AutoKey.
template<typename O , typename S , typename C >
bool utility::keys::operator> (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKey > AutoKey.
template<typename O , typename S , typename C >
bool utility::keys::sequential (AutoKey< O, S, C > const &a, AutoKey< O, S, C > const &b)
 AutoKeys are sequential?

Detailed Description

Automatic hidden index key abstract base class.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Note:
  • Object (O) parameter: The type of object being keyed
  • Super (S) parameter: The super Key class (== or derived from Key)
  • Client (C) parameter: The client (user) of these keys
  • There is a distinct Key type for each Object+Super+Client combination
  • Hidden index is set automatically at construction in the order keys are constructed
  • Default-constructed keys are assigned a hidden index of zero: Use indentifier argument(s) when constructing keys meant for collections
  • Key-constructed keys copy the index of the source key so they compare as equal
  • Can derive privately from an AutoKey to share the index set of another Key type without allowing convertibility (for type safety)
  • Designed for collections of keys of a common abstract or concrete Key type
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines