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

Keyed-access map with key subset map for each client class. More...

#include <utility/keys/ClassKeyMap.fwd.hh>
#include <utility/vector1.hh>
#include <cassert>
#include <utility>

Classes

class  utility::keys::ClassKeyMap< K, T, C >
 Keyed-access map with key subset map for each client 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.


namespace  std
 

STL namespace.


Functions

template<typename K , typename T , typename C >
void utility::keys::swap (ClassKeyMap< K, T, C > &a, ClassKeyMap< K, T, C > &b)
 swap( ClassKeyMap, ClassKeyMap )
template<typename K , typename T , typename C >
bool utility::keys::operator== (ClassKeyMap< K, T, C > const &a, ClassKeyMap< K, T, C > const &b)
 ClassKeyMap == ClassKeyMap.
template<typename K , typename T , typename C >
bool utility::keys::operator!= (ClassKeyMap< K, T, C > const &a, ClassKeyMap< K, T, C > const &b)
 ClassKeyMap != ClassKeyMap.
template<typename K , typename T , typename C >
bool utility::keys::operator< (ClassKeyMap< K, T, C > const &a, ClassKeyMap< K, T, C > const &b)
 ClassKeyMap < ClassKeyMap.
template<typename K , typename T , typename C >
bool utility::keys::operator> (ClassKeyMap< K, T, C > const &a, ClassKeyMap< K, T, C > const &b)
 ClassKeyMap > ClassKeyMap.
template<typename K , typename T , typename C >
bool utility::keys::operator<= (ClassKeyMap< K, T, C > const &a, ClassKeyMap< K, T, C > const &b)
 ClassKeyMap <= ClassKeyMap.
template<typename K , typename T , typename C >
bool utility::keys::operator>= (ClassKeyMap< K, T, C > const &a, ClassKeyMap< K, T, C > const &b)
 ClassKeyMap >= ClassKeyMap.
template<typename K , typename T , typename C >
void std::swap (utility::keys::ClassKeyMap< K, T, C > &a, utility::keys::ClassKeyMap< K, T, C > &b)
 swap( ClassKeyMap, ClassKeyMap )

Detailed Description

Keyed-access map with key subset map for each client class.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Note:
  • Key can be any type that is convertible to the index map's index type
  • The Key type should not be the same as Index or you'll get an operator[] ambiguity
  • If a utility Key subtype is used it must declare the ClassKeyMap as a friend
  • Keys are added to map by assign(), operator(), add(), and activate()
  • Keys can be added to map out of order
  • Client (C) parameter => Distinct type per client
  • Static index map => Client vectors share key set
  • Can create elements and then assign keys or vice versa: At any time you Can have a vector with more or fewer elements than there are active keys
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines