ProteoWizard
Public Types | Public Member Functions | List of all members
pwiz::util::CharIndexedVector< T > Struct Template Reference

a wrapper for boost::array that is indexable by character; supports indexes 0-127 More...

#include <CharIndexedVector.hpp>

Inheritance diagram for pwiz::util::CharIndexedVector< T >:

Public Types

typedef boost::array< T, 129 > type
 
typedef CharIndexedVectorIterator< T > iterator
 
typedef CharIndexedVectorConstIterator< T > const_iterator
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 

Public Member Functions

 CharIndexedVector ()
 
size_t size () const
 
void erase (const char c)
 
void clear ()
 
char getIndexAsChar (iterator itr) const
 
char getIndexAsChar (size_t i) const
 
const T & operator[] (const char c) const
 
T & operator[] (const char c)
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 

Detailed Description

template<class T>
struct pwiz::util::CharIndexedVector< T >

a wrapper for boost::array that is indexable by character; supports indexes 0-127

Definition at line 191 of file CharIndexedVector.hpp.

Member Typedef Documentation

◆ type

template<class T >
typedef boost::array<T, 129> pwiz::util::CharIndexedVector< T >::type

Definition at line 193 of file CharIndexedVector.hpp.

◆ iterator

template<class T >
typedef CharIndexedVectorIterator<T> pwiz::util::CharIndexedVector< T >::iterator

Definition at line 194 of file CharIndexedVector.hpp.

◆ const_iterator

template<class T >
typedef CharIndexedVectorConstIterator<T> pwiz::util::CharIndexedVector< T >::const_iterator

Definition at line 195 of file CharIndexedVector.hpp.

◆ reverse_iterator

template<class T >
typedef std::reverse_iterator<iterator> pwiz::util::CharIndexedVector< T >::reverse_iterator

Definition at line 196 of file CharIndexedVector.hpp.

◆ const_reverse_iterator

template<class T >
typedef std::reverse_iterator<const_iterator> pwiz::util::CharIndexedVector< T >::const_reverse_iterator

Definition at line 197 of file CharIndexedVector.hpp.

Constructor & Destructor Documentation

◆ CharIndexedVector()

template<class T >
pwiz::util::CharIndexedVector< T >::CharIndexedVector ( )
inline

Member Function Documentation

◆ size()

template<class T >
size_t pwiz::util::CharIndexedVector< T >::size ( ) const
inline

Definition at line 204 of file CharIndexedVector.hpp.

205 {
206 return 128;
207 }

◆ erase()

template<class T >
void pwiz::util::CharIndexedVector< T >::erase ( const char  c)
inline

Definition at line 209 of file CharIndexedVector.hpp.

210 {
211 this->operator[](c) = T();
212 }
const T & operator[](const char c) const

References pwiz::util::CharIndexedVector< T >::operator[]().

◆ clear()

template<class T >
void pwiz::util::CharIndexedVector< T >::clear ( )
inline

Definition at line 214 of file CharIndexedVector.hpp.

215 {
216 std::fill(type::begin(), type::end(), T());
217 }

Referenced by pwiz::util::CharIndexedVector< T >::CharIndexedVector().

◆ getIndexAsChar() [1/2]

template<class T >
char pwiz::util::CharIndexedVector< T >::getIndexAsChar ( iterator  itr) const
inline

Definition at line 219 of file CharIndexedVector.hpp.

220 {
221 return 'A' + (itr - type::begin());
222 }

◆ getIndexAsChar() [2/2]

template<class T >
char pwiz::util::CharIndexedVector< T >::getIndexAsChar ( size_t  i) const
inline

Definition at line 224 of file CharIndexedVector.hpp.

225 {
226 return 'A' + (&this->operator[](i) - type::begin());
227 }

References pwiz::util::CharIndexedVector< T >::operator[]().

◆ operator[]() [1/2]

template<class T >
const T & pwiz::util::CharIndexedVector< T >::operator[] ( const char  c) const
inline

Definition at line 229 of file CharIndexedVector.hpp.

230 {
231 return type::operator[]((size_t) c);
232 }

Referenced by pwiz::util::CharIndexedVector< T >::erase(), and pwiz::util::CharIndexedVector< T >::getIndexAsChar().

◆ operator[]() [2/2]

template<class T >
T & pwiz::util::CharIndexedVector< T >::operator[] ( const char  c)
inline

Definition at line 234 of file CharIndexedVector.hpp.

235 {
236 return type::operator[]((size_t) c);
237 }

◆ begin() [1/2]

template<class T >
const_iterator pwiz::util::CharIndexedVector< T >::begin ( ) const
inline

Definition at line 239 of file CharIndexedVector.hpp.

239{return type::begin();}

◆ end() [1/2]

template<class T >
const_iterator pwiz::util::CharIndexedVector< T >::end ( ) const
inline

Definition at line 240 of file CharIndexedVector.hpp.

240{return type::end();}

◆ begin() [2/2]

template<class T >
iterator pwiz::util::CharIndexedVector< T >::begin ( )
inline

Definition at line 241 of file CharIndexedVector.hpp.

241{return type::begin();}

◆ end() [2/2]

template<class T >
iterator pwiz::util::CharIndexedVector< T >::end ( )
inline

Definition at line 242 of file CharIndexedVector.hpp.

242{return type::end();}

The documentation for this struct was generated from the following file: