Rosetta 3.3
Classes | Namespaces | Functions
src/utility/keys/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 <cassert>

Classes

class  utility::keys::SmallKeyVector< K, T >
 Keyed-access vector with key subset map. 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 >
void utility::keys::swap (SmallKeyVector< K, T > &a, SmallKeyVector< K, T > &b)
 swap( SmallKeyVector, SmallKeyVector )
template<typename K , typename T >
bool utility::keys::operator== (SmallKeyVector< K, T > const &a, SmallKeyVector< K, T > const &b)
 SmallKeyVector == SmallKeyVector.
template<typename K , typename T >
bool utility::keys::operator!= (SmallKeyVector< K, T > const &a, SmallKeyVector< K, T > const &b)
 SmallKeyVector != SmallKeyVector.
template<typename K , typename T >
void std::swap (utility::keys::SmallKeyVector< K, T > &a, utility::keys::SmallKeyVector< K, T > &b)
 swap( SmallKeyVector, SmallKeyVector )

Detailed Description

Keyed-access vector with key subset map.

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 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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines