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

Keyed-access vector. More...

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

Classes

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

Detailed Description

Keyed-access vector.

Author:
Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
Note:
  • Vector for a full set of active keys: For key subsets use SmallKeyVector
  • Similar to using vector1< T > with some extra syntax for automatic growth
  • Key can be any type that is convertible to the vector's index type
  • If a utility Key subtype is used it must declare the KeyVector as a friend
  • Keys are added by assign(), operator(), and add()
  • Keys can be added out of order: holes are default constructed values
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines