Rosetta 3.3
Public Types | Public Member Functions | Friends
utility::keys::SmallKeyVector< K, T > Class Template Reference

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

#include <SmallKeyVector.hh>

Collaboration diagram for utility::keys::SmallKeyVector< K, T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedefkey_type
typedef Vector::value_type value_type
typedef Vector::reference reference
typedef Vector::const_reference const_reference
typedef Vector::pointer pointer
typedef Vector::const_pointer const_pointer
typedef Vector::iterator iterator
typedef Vector::const_iterator const_iterator
typedef Vector::reverse_iterator reverse_iterator
typedef
Vector::const_reverse_iterator 
const_reverse_iterator
typedef Vector::size_type size_type
typedef Vector::index_type index_type
typedef Vector::difference_type difference_type
typedef Vector::allocator_type allocator_type
typedefKey
typedef Vector::Value Value
typedef Vector::Reference Reference
typedef Vector::ConstReference ConstReference
typedef Vector::Pointer Pointer
typedef Vector::ConstPointer ConstPointer
typedef Vector::Iterator Iterator
typedef Vector::ConstIterator ConstIterator
typedef Vector::ReverseIterator ReverseIterator
typedef
Vector::ConstReverseIterator 
ConstReverseIterator
typedef Vector::Size Size
typedef Vector::Index Index
typedef Vector::Difference Difference
typedef Vector::Allocator Allocator

Public Member Functions

 SmallKeyVector ()
 Default constructor.
 SmallKeyVector (SmallKeyVector const &a)
 Copy constructor.
 SmallKeyVector (Size const num)
 Size constructor.
 SmallKeyVector (Size const num, Value const &value)
 Uniform value constructor.
template<typename InputIterator >
 SmallKeyVector (InputIterator const beg, InputIterator const end)
 Iterator range constructor.
 ~SmallKeyVector ()
 Destructor.
SmallKeyVectoroperator= (SmallKeyVector const &a)
 Copy assignment.
SmallKeyVectoroperator= (Value const &value)
 Uniform value assignment to current elements.
SmallKeyVectorassign (Key const &key, Value const &value)
 Assign a value to an element with a key.
void assign (Size const num, Value const &value)
 Uniform value assignment.
template<typename InputIterator >
void assign (InputIterator const beg, InputIterator const end)
 Iterator assignment.
SmallKeyVectoradd (Key const &key)
 Add an element with a key if not present: Activate key if inactive.
Iterator insert (Iterator const pos, Value const &value)
 Insert an element at an iterator position.
void insert (Iterator const pos, Size const num, Value const &value)
 Insert num copies of an element at an iterator position.
template<typename InputIterator >
void insert (Iterator const pos, InputIterator const beg, InputIterator const end)
 Insert elements from iterator range [beg,end) at an iterator position.
void push_back (Value const &value)
 Appends an element.
Iterator erase (Iterator const pos)
 Erase an element at an iterator position.
Iterator erase (Iterator const beg, Iterator const end)
 Erase elements in the iterator range [beg,end)
void pop_back ()
 Removes the last element.
void resize (Size const num)
 Resize: Default construct new elements.
void resize (Size const num, Value const &value)
 Resize: Assign given value to new elements.
void reserve (Size const num)
 Reserve space for a given number of elements.
void shrink ()
 Shrink the vectors to remove unused capacity.
void swap (SmallKeyVector &a)
 swap( SmallKeyVector )
void clear ()
 Clear the vector.
Size size () const
 Size.
bool empty () const
 Empty?
Size max_size () const
 Max size.
Size capacity () const
 Capacity.
ConstReference front () const
 Front element.
Reference front ()
 Front element.
ConstReference back () const
 Back element.
Reference back ()
 Back element.
bool has (Key const &key) const
 Is an element with a key present?
bool active (Key const &key) const
 Is a key active?
bool inactive (Key const &key) const
 Is a key inactive?
Index const & index (Key const &key)
 Index of a key.
ConstIterator find (Key const &key) const
 Iterator to element with a key.
Iterator find (Key const &key)
 Iterator to element with a key.
Reference operator() (Key const &key)
 SmallKeyVector( key )
ConstReference operator[] (Key const &key) const
 SmallKeyVector[ key ] const.
Reference operator[] (Key const &key)
 SmallKeyVector[ key ].
ConstReference at (Key const &key) const
 Element at index key: Bounds checked.
Reference at (Key const &key)
 Element at index key: Bounds checked.
ConstReference operator[] (Index const &i) const
 SmallKeyVector[ index ] const.
Reference operator[] (Index const &i)
 SmallKeyVector[ index ].
ConstIterator begin () const
 Begin iterator.
Iterator begin ()
 Begin iterator.
ConstIterator end () const
 End iterator.
Iterator end ()
 End iterator.
ConstReverseIterator rbegin () const
 Begin reverse iterator.
ReverseIterator rbegin ()
 Begin reverse iterator.
ConstReverseIterator rend () const
 End reverse iterator.
ReverseIterator rend ()
 End reverse iterator.

Friends

void swap (SmallKeyVector &a, SmallKeyVector &b)
 swap( SmallKeyVector, SmallKeyVector )
bool operator== (SmallKeyVector const &a, SmallKeyVector const &b)
 SmallKeyVector == SmallKeyVector.
bool operator!= (SmallKeyVector const &a, SmallKeyVector const &b)
 SmallKeyVector != SmallKeyVector.

Detailed Description

template<typename K, typename T>
class utility::keys::SmallKeyVector< K, T >

Keyed-access vector with key subset map.


Member Typedef Documentation

template<typename K, typename T>
typedef Vector::Allocator utility::keys::SmallKeyVector< K, T >::Allocator
template<typename K, typename T>
typedef Vector::const_pointer utility::keys::SmallKeyVector< K, T >::const_pointer
template<typename K, typename T>
typedef Vector::ConstIterator utility::keys::SmallKeyVector< K, T >::ConstIterator
template<typename K, typename T>
typedef Vector::ConstPointer utility::keys::SmallKeyVector< K, T >::ConstPointer
template<typename K, typename T>
typedef Vector::Difference utility::keys::SmallKeyVector< K, T >::Difference
template<typename K, typename T>
typedef Vector::Index utility::keys::SmallKeyVector< K, T >::Index
template<typename K, typename T>
typedef Vector::index_type utility::keys::SmallKeyVector< K, T >::index_type
template<typename K, typename T>
typedef Vector::Iterator utility::keys::SmallKeyVector< K, T >::Iterator
template<typename K, typename T>
typedef Vector::iterator utility::keys::SmallKeyVector< K, T >::iterator
template<typename K, typename T>
typedef K utility::keys::SmallKeyVector< K, T >::Key
template<typename K, typename T>
typedef K utility::keys::SmallKeyVector< K, T >::key_type
template<typename K, typename T>
typedef Vector::Pointer utility::keys::SmallKeyVector< K, T >::Pointer
template<typename K, typename T>
typedef Vector::pointer utility::keys::SmallKeyVector< K, T >::pointer
template<typename K, typename T>
typedef Vector::Reference utility::keys::SmallKeyVector< K, T >::Reference
template<typename K, typename T>
typedef Vector::reference utility::keys::SmallKeyVector< K, T >::reference
template<typename K, typename T>
typedef Vector::Size utility::keys::SmallKeyVector< K, T >::Size
template<typename K, typename T>
typedef Vector::size_type utility::keys::SmallKeyVector< K, T >::size_type
template<typename K, typename T>
typedef Vector::Value utility::keys::SmallKeyVector< K, T >::Value
template<typename K, typename T>
typedef Vector::value_type utility::keys::SmallKeyVector< K, T >::value_type

Constructor & Destructor Documentation

template<typename K, typename T>
utility::keys::SmallKeyVector< K, T >::SmallKeyVector ( ) [inline]

Default constructor.

template<typename K, typename T>
utility::keys::SmallKeyVector< K, T >::SmallKeyVector ( SmallKeyVector< K, T > const &  a) [inline]

Copy constructor.

template<typename K, typename T>
utility::keys::SmallKeyVector< K, T >::SmallKeyVector ( Size const  num) [inline, explicit]

Size constructor.

template<typename K, typename T>
utility::keys::SmallKeyVector< K, T >::SmallKeyVector ( Size const  num,
Value const &  value 
) [inline]

Uniform value constructor.

template<typename K, typename T>
template<typename InputIterator >
utility::keys::SmallKeyVector< K, T >::SmallKeyVector ( InputIterator const  beg,
InputIterator const  end 
) [inline]

Iterator range constructor.

template<typename K, typename T>
utility::keys::SmallKeyVector< K, T >::~SmallKeyVector ( ) [inline]

Destructor.


Member Function Documentation

template<typename K, typename T>
bool utility::keys::SmallKeyVector< K, T >::active ( Key const &  key) const [inline]
template<typename K, typename T>
SmallKeyVector& utility::keys::SmallKeyVector< K, T >::add ( Key const &  key) [inline]

Add an element with a key if not present: Activate key if inactive.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::assign ( Size const  num,
Value const &  value 
) [inline]

Uniform value assignment.

template<typename K, typename T>
template<typename InputIterator >
void utility::keys::SmallKeyVector< K, T >::assign ( InputIterator const  beg,
InputIterator const  end 
) [inline]

Iterator assignment.

template<typename K, typename T>
SmallKeyVector& utility::keys::SmallKeyVector< K, T >::assign ( Key const &  key,
Value const &  value 
) [inline]

Assign a value to an element with a key.

Note:
Adds the key to the map if not present
Expands the vector if necessary
template<typename K, typename T>
ConstReference utility::keys::SmallKeyVector< K, T >::at ( Key const &  key) const [inline]

Element at index key: Bounds checked.

template<typename K, typename T>
Reference utility::keys::SmallKeyVector< K, T >::at ( Key const &  key) [inline]

Element at index key: Bounds checked.

template<typename K, typename T>
ConstReference utility::keys::SmallKeyVector< K, T >::back ( ) const [inline]

Back element.

template<typename K, typename T>
Reference utility::keys::SmallKeyVector< K, T >::back ( ) [inline]

Back element.

template<typename K, typename T>
ConstIterator utility::keys::SmallKeyVector< K, T >::begin ( ) const [inline]
template<typename K, typename T>
Iterator utility::keys::SmallKeyVector< K, T >::begin ( ) [inline]

Begin iterator.

template<typename K, typename T>
Size utility::keys::SmallKeyVector< K, T >::capacity ( ) const [inline]

Capacity.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::clear ( ) [inline]

Clear the vector.

template<typename K, typename T>
bool utility::keys::SmallKeyVector< K, T >::empty ( ) const [inline]

Empty?

template<typename K, typename T>
ConstIterator utility::keys::SmallKeyVector< K, T >::end ( ) const [inline]
template<typename K, typename T>
Iterator utility::keys::SmallKeyVector< K, T >::end ( ) [inline]

End iterator.

template<typename K, typename T>
Iterator utility::keys::SmallKeyVector< K, T >::erase ( Iterator const  pos) [inline]

Erase an element at an iterator position.

template<typename K, typename T>
Iterator utility::keys::SmallKeyVector< K, T >::erase ( Iterator const  beg,
Iterator const  end 
) [inline]

Erase elements in the iterator range [beg,end)

template<typename K, typename T>
ConstIterator utility::keys::SmallKeyVector< K, T >::find ( Key const &  key) const [inline]

Iterator to element with a key.

template<typename K, typename T>
Iterator utility::keys::SmallKeyVector< K, T >::find ( Key const &  key) [inline]

Iterator to element with a key.

template<typename K, typename T>
ConstReference utility::keys::SmallKeyVector< K, T >::front ( ) const [inline]

Front element.

template<typename K, typename T>
Reference utility::keys::SmallKeyVector< K, T >::front ( ) [inline]

Front element.

template<typename K, typename T>
bool utility::keys::SmallKeyVector< K, T >::has ( Key const &  key) const [inline]
template<typename K, typename T>
bool utility::keys::SmallKeyVector< K, T >::inactive ( Key const &  key) const [inline]

Is a key inactive?

template<typename K, typename T>
Index const& utility::keys::SmallKeyVector< K, T >::index ( Key const &  key) [inline]

Index of a key.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::insert ( Iterator const  pos,
Size const  num,
Value const &  value 
) [inline]

Insert num copies of an element at an iterator position.

template<typename K, typename T>
template<typename InputIterator >
void utility::keys::SmallKeyVector< K, T >::insert ( Iterator const  pos,
InputIterator const  beg,
InputIterator const  end 
) [inline]

Insert elements from iterator range [beg,end) at an iterator position.

template<typename K, typename T>
Iterator utility::keys::SmallKeyVector< K, T >::insert ( Iterator const  pos,
Value const &  value 
) [inline]

Insert an element at an iterator position.

template<typename K, typename T>
Size utility::keys::SmallKeyVector< K, T >::max_size ( ) const [inline]

Max size.

template<typename K, typename T>
Reference utility::keys::SmallKeyVector< K, T >::operator() ( Key const &  key) [inline]

SmallKeyVector( key )

Note:
Activates the key if inactive
Expands the vector if necessary
template<typename K, typename T>
SmallKeyVector& utility::keys::SmallKeyVector< K, T >::operator= ( Value const &  value) [inline]

Uniform value assignment to current elements.

template<typename K, typename T>
SmallKeyVector& utility::keys::SmallKeyVector< K, T >::operator= ( SmallKeyVector< K, T > const &  a) [inline]

Copy assignment.

template<typename K, typename T>
ConstReference utility::keys::SmallKeyVector< K, T >::operator[] ( Index const &  i) const [inline]

SmallKeyVector[ index ] const.

template<typename K, typename T>
Reference utility::keys::SmallKeyVector< K, T >::operator[] ( Key const &  key) [inline]

SmallKeyVector[ key ].

template<typename K, typename T>
Reference utility::keys::SmallKeyVector< K, T >::operator[] ( Index const &  i) [inline]

SmallKeyVector[ index ].

template<typename K, typename T>
ConstReference utility::keys::SmallKeyVector< K, T >::operator[] ( Key const &  key) const [inline]

SmallKeyVector[ key ] const.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::pop_back ( ) [inline]

Removes the last element.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::push_back ( Value const &  value) [inline]

Appends an element.

template<typename K, typename T>
ConstReverseIterator utility::keys::SmallKeyVector< K, T >::rbegin ( ) const [inline]

Begin reverse iterator.

template<typename K, typename T>
ReverseIterator utility::keys::SmallKeyVector< K, T >::rbegin ( ) [inline]

Begin reverse iterator.

template<typename K, typename T>
ConstReverseIterator utility::keys::SmallKeyVector< K, T >::rend ( ) const [inline]

End reverse iterator.

template<typename K, typename T>
ReverseIterator utility::keys::SmallKeyVector< K, T >::rend ( ) [inline]

End reverse iterator.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::reserve ( Size const  num) [inline]

Reserve space for a given number of elements.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::resize ( Size const  num,
Value const &  value 
) [inline]

Resize: Assign given value to new elements.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::resize ( Size const  num) [inline]

Resize: Default construct new elements.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::shrink ( ) [inline]

Shrink the vectors to remove unused capacity.

template<typename K, typename T>
Size utility::keys::SmallKeyVector< K, T >::size ( ) const [inline]

Size.

template<typename K, typename T>
void utility::keys::SmallKeyVector< K, T >::swap ( SmallKeyVector< K, T > &  a) [inline]

Friends And Related Function Documentation

template<typename K, typename T>
bool operator!= ( SmallKeyVector< K, T > const &  a,
SmallKeyVector< K, T > const &  b 
) [friend]
template<typename K, typename T>
bool operator== ( SmallKeyVector< K, T > const &  a,
SmallKeyVector< K, T > const &  b 
) [friend]
template<typename K, typename T>
void swap ( SmallKeyVector< K, T > &  a,
SmallKeyVector< K, T > &  b 
) [friend]

swap( SmallKeyVector, SmallKeyVector )


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines