Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
SmallKeyVector.hh File Reference

Keyed-access vector with key subset map. More...

#include <utility/keys/SmallKeyVector.fwd.hh>
#include <utility/vector1.hh>
#include <algorithm>
#include <utility/assert.hh>

Classes

class  utility::keys::SmallKeyVector< K, T >
 Keyed-access vector with key subset map. More...
 

Namespaces

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

Functions

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

Detailed Description

Keyed-access vector with key subset map.

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 SmallKeyVector as a friend
  • Keys are added to map by assign(), operator(), and add()
  • Keys can be added to map out of order
  • Index map is specific to the SmallKeyVector so this container is intended for use where the index range of the keys is either small or dense
  • 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