Rosetta Utilities  2014.35
Classes | Namespaces | Functions
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

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

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 ) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 ) More...
 

Detailed Description

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

Author
Stuart G. Mentzer (Stuar.nosp@m.t_Me.nosp@m.ntzer.nosp@m.@obj.nosp@m.exx.c.nosp@m.om)
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