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

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

#include <SmallKeyMap.hh>

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

List of all members.

Public Types

typedefkey_type
typedefmapped_type
typedef T & mapped_reference
typedef T const & mapped_const_reference
typedef T * mapped_pointer
typedef T const * mapped_const_pointer
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
typedefMapped
typedef T & MappedReference
typedef T const & MappedConstReference
typedef T * MappedPointer
typedef T const * MappedConstPointer
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

 SmallKeyMap ()
 Default constructor.
 SmallKeyMap (SmallKeyMap const &a)
 Copy constructor.
template<typename InputIterator >
 SmallKeyMap (InputIterator const beg, InputIterator const end)
 Iterator range constructor.
 ~SmallKeyMap ()
 Destructor.
SmallKeyMapoperator= (SmallKeyMap const &a)
 Copy assignment.
SmallKeyMapoperator= (Mapped const &mapped)
 Uniform mapped value assignment to current elements.
SmallKeyMapassign (Key const &key, Mapped const &mapped)
 Assign a mapped value to an element with a key.
SmallKeyMapassign (Value const &value)
 Assign a value to an element.
template<typename InputIterator >
void assign (InputIterator const beg, InputIterator const end)
 Iterator assignment.
SmallKeyMapadd (Key const &key)
 Add an element with a key if not present: Activate key if inactive.
SmallKeyMapinsert (Value const &value)
 Insert an element.
template<typename InputIterator >
void insert (InputIterator const beg, InputIterator const end)
 Insert elements from iterator range [beg,end)
void reserve (Size const num)
 Reserve space for a given number of elements.
void shrink ()
 Shrink the vectors to remove unused capacity.
void swap (SmallKeyMap &a)
 swap( SmallKeyMap )
void clear ()
 Clear the vector.
Size size () const
 Size.
bool empty () const
 Empty?
Size max_size () const
 Max size.
Size capacity () const
 Capacity.
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.
MappedReference operator() (Key const &key)
 SmallKeyMap( key )
MappedConstReference operator[] (Key const &key) const
 SmallKeyMap[ key ] const.
MappedReference operator[] (Key const &key)
 SmallKeyMap[ key ].
MappedConstReference operator[] (Index const &i) const
 SmallKeyMap[ index ] const.
MappedReference operator[] (Index const &i)
 SmallKeyMap[ index ].
ConstReference operator() (Index const &i) const
 SmallKeyMap( index ) const.
Reference operator() (Index const &i)
 SmallKeyMap( 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 (SmallKeyMap &a, SmallKeyMap &b)
 swap( SmallKeyMap, SmallKeyMap )
bool operator== (SmallKeyMap const &a, SmallKeyMap const &b)
 SmallKeyMap == SmallKeyMap.
bool operator!= (SmallKeyMap const &a, SmallKeyMap const &b)
 SmallKeyMap != SmallKeyMap.

Detailed Description

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

Keyed-access map with key subset map.


Member Typedef Documentation

template<typename K, typename T>
typedef Vector::Allocator utility::keys::SmallKeyMap< K, T >::Allocator
template<typename K, typename T>
typedef Vector::allocator_type utility::keys::SmallKeyMap< K, T >::allocator_type
template<typename K, typename T>
typedef Vector::const_iterator utility::keys::SmallKeyMap< K, T >::const_iterator
template<typename K, typename T>
typedef Vector::const_pointer utility::keys::SmallKeyMap< K, T >::const_pointer
template<typename K, typename T>
typedef Vector::ConstIterator utility::keys::SmallKeyMap< K, T >::ConstIterator
template<typename K, typename T>
typedef Vector::ConstPointer utility::keys::SmallKeyMap< K, T >::ConstPointer
template<typename K, typename T>
typedef Vector::ConstReference utility::keys::SmallKeyMap< K, T >::ConstReference
template<typename K, typename T>
typedef Vector::Difference utility::keys::SmallKeyMap< K, T >::Difference
template<typename K, typename T>
typedef Vector::Index utility::keys::SmallKeyMap< K, T >::Index
template<typename K, typename T>
typedef Vector::index_type utility::keys::SmallKeyMap< K, T >::index_type
template<typename K, typename T>
typedef Vector::iterator utility::keys::SmallKeyMap< K, T >::iterator
template<typename K, typename T>
typedef Vector::Iterator utility::keys::SmallKeyMap< K, T >::Iterator
template<typename K, typename T>
typedef K utility::keys::SmallKeyMap< K, T >::Key
template<typename K, typename T>
typedef K utility::keys::SmallKeyMap< K, T >::key_type
template<typename K, typename T>
typedef T utility::keys::SmallKeyMap< K, T >::Mapped
template<typename K, typename T>
typedef T const* utility::keys::SmallKeyMap< K, T >::mapped_const_pointer
template<typename K, typename T>
typedef T const& utility::keys::SmallKeyMap< K, T >::mapped_const_reference
template<typename K, typename T>
typedef T* utility::keys::SmallKeyMap< K, T >::mapped_pointer
template<typename K, typename T>
typedef T& utility::keys::SmallKeyMap< K, T >::mapped_reference
template<typename K, typename T>
typedef T utility::keys::SmallKeyMap< K, T >::mapped_type
template<typename K, typename T>
typedef T const* utility::keys::SmallKeyMap< K, T >::MappedConstPointer
template<typename K, typename T>
typedef T const& utility::keys::SmallKeyMap< K, T >::MappedConstReference
template<typename K, typename T>
typedef T* utility::keys::SmallKeyMap< K, T >::MappedPointer
template<typename K, typename T>
typedef T& utility::keys::SmallKeyMap< K, T >::MappedReference
template<typename K, typename T>
typedef Vector::pointer utility::keys::SmallKeyMap< K, T >::pointer
template<typename K, typename T>
typedef Vector::Pointer utility::keys::SmallKeyMap< K, T >::Pointer
template<typename K, typename T>
typedef Vector::reference utility::keys::SmallKeyMap< K, T >::reference
template<typename K, typename T>
typedef Vector::Reference utility::keys::SmallKeyMap< K, T >::Reference
template<typename K, typename T>
typedef Vector::Size utility::keys::SmallKeyMap< K, T >::Size
template<typename K, typename T>
typedef Vector::size_type utility::keys::SmallKeyMap< K, T >::size_type
template<typename K, typename T>
typedef Vector::Value utility::keys::SmallKeyMap< K, T >::Value
template<typename K, typename T>
typedef Vector::value_type utility::keys::SmallKeyMap< K, T >::value_type

Constructor & Destructor Documentation

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

Default constructor.

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

Copy constructor.

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

Iterator range constructor.

References assign_charges::first, and color_pdb::i.

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

Destructor.


Member Function Documentation

template<typename K, typename T>
bool utility::keys::SmallKeyMap< K, T >::active ( Key const &  key) const [inline]
template<typename K, typename T>
SmallKeyMap& utility::keys::SmallKeyMap< 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>
SmallKeyMap& utility::keys::SmallKeyMap< K, T >::assign ( Value const &  value) [inline]

Assign a value to an element.

Note:
Adds the key to the map if not present
Expands the vector if necessary

References value.

template<typename K, typename T>
template<typename InputIterator >
void utility::keys::SmallKeyMap< K, T >::assign ( InputIterator const  beg,
InputIterator const  end 
) [inline]
template<typename K, typename T>
SmallKeyMap& utility::keys::SmallKeyMap< K, T >::assign ( Key const &  key,
Mapped const &  mapped 
) [inline]

Assign a mapped 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>
ConstIterator utility::keys::SmallKeyMap< K, T >::begin ( ) const [inline]

Begin iterator.

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

Begin iterator.

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

Capacity.

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

Clear the vector.

Referenced by utility::keys::SmallKeyMap< K, T >::assign().

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

Empty?

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

End iterator.

Referenced by utility::keys::SmallKeyMap< K, T >::insert().

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

End iterator.

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

Iterator to element with a key.

References utility::keys::SmallKeyMap< K, T >::active(), and key.

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

Iterator to element with a key.

References utility::keys::SmallKeyMap< K, T >::active(), and key.

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

Is an element with a key present?

References utility::keys::SmallKeyMap< K, T >::active().

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

Is a key inactive?

References utility::vectorL< L, T, A >::has().

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

Index of a key.

References utility::keys::SmallKeyMap< K, T >::active(), and key.

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

Insert elements from iterator range [beg,end)

References utility::keys::SmallKeyMap< K, T >::end(), color_pdb::i, and utility::keys::SmallKeyMap< K, T >::insert().

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

Insert an element.

Note:
Adds the key to the map if not present
Expands the vector if necessary

References value.

Referenced by utility::keys::SmallKeyMap< K, T >::insert().

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

Max size.

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

SmallKeyMap( key )

Note:
Activates the key if inactive
Expands the vector if necessary
template<typename K, typename T>
ConstReference utility::keys::SmallKeyMap< K, T >::operator() ( Index const &  i) const [inline]

SmallKeyMap( index ) const.

References color_pdb::i.

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

SmallKeyMap( index )

References color_pdb::i.

template<typename K, typename T>
SmallKeyMap& utility::keys::SmallKeyMap< K, T >::operator= ( Mapped const &  mapped) [inline]

Uniform mapped value assignment to current elements.

References color_pdb::i.

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

Copy assignment.

template<typename K, typename T>
MappedConstReference utility::keys::SmallKeyMap< K, T >::operator[] ( Key const &  key) const [inline]
template<typename K, typename T>
MappedReference utility::keys::SmallKeyMap< K, T >::operator[] ( Key const &  key) [inline]
template<typename K, typename T>
MappedReference utility::keys::SmallKeyMap< K, T >::operator[] ( Index const &  i) [inline]

SmallKeyMap[ index ].

References color_pdb::i.

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

SmallKeyMap[ index ] const.

References color_pdb::i.

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

Begin reverse iterator.

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

Begin reverse iterator.

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

End reverse iterator.

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

End reverse iterator.

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

Reserve space for a given number of elements.

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

Shrink the vectors to remove unused capacity.

References utility::vectorL< L, T, A >::shrink().

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

Size.

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

swap( SmallKeyMap )

References utility::vectorL< L, T, A >::swap().

Referenced by std::swap(), and utility::keys::swap().


Friends And Related Function Documentation

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

swap( SmallKeyMap, SmallKeyMap )


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