25 #ifndef _CHARINDEXEDVECTOR_HPP_ 26 #define _CHARINDEXEDVECTOR_HPP_ 28 #include "boost/array.hpp" 37 typedef boost::array<T, 129>
type;
60 return m_itr != *(iterator*)&rhs;
65 return m_itr - rhs.
m_itr;
102 return (*
this += -_Off);
107 return m_itr < rhs.
m_itr;
115 typedef boost::array<T, 129>
type;
116 typename type::const_iterator
m_itr;
138 return m_itr != *(const_iterator*)&rhs;
143 return m_itr - rhs.
m_itr;
180 return (*
this += -_Off);
185 return m_itr < rhs.
m_itr;
193 typedef boost::array<T, 129>
type;
211 this->operator[](c) = T();
216 std::fill(type::begin(), type::end(), T());
221 return 'A' + (itr - type::begin());
226 return 'A' + (&this->operator[](i) - type::begin());
231 return type::operator[]((
size_t) c);
236 return type::operator[]((
size_t) c);
239 const_iterator
begin()
const {
return type::begin();}
240 const_iterator
end()
const {
return type::end();}
241 iterator
begin() {
return type::begin();}
242 iterator
end() {
return type::end();}
248 #endif // _CHARINDEXEDVECTOR_HPP_ CharIndexedVectorIterator & operator-=(difference_type _Off)
T & operator[](const char c)
const_iterator end() const
bool operator!=(const CharIndexedVectorConstIterator &rhs) const
char getIndexAsChar(size_t i) const
type::size_type size_type
std::reverse_iterator< const_iterator > const_reverse_iterator
type::difference_type difference_type
CharIndexedVectorConstIterator< T > const_iterator
CharIndexedVectorConstIterator & operator++()
bool operator<(const CharIndexedVectorIterator &rhs)
type::reference reference
CharIndexedVectorConstIterator operator--(int)
std::random_access_iterator_tag iterator_category
type::const_iterator const_iterator
type::reference reference
CharIndexedVectorIterator< T > iterator
a const_iterator for CharIndexedVector
std::random_access_iterator_tag iterator_category
CharIndexedVectorIterator operator--(int)
type::value_type value_type
reference operator*() const
boost::array< T, 129 > type
CharIndexedVectorConstIterator(const const_iterator &itr)
type::const_reference const_reference
const_reference operator*() const
difference_type operator-(const CharIndexedVectorConstIterator &rhs) const
an iterator for CharIndexedVector
type::const_iterator m_itr
CharIndexedVectorConstIterator operator++(int)
char getIndexAsChar(iterator itr) const
CharIndexedVectorIterator & operator+=(difference_type _Off)
bool operator<(const CharIndexedVectorConstIterator &rhs)
CharIndexedVectorIterator operator++(int)
type::const_iterator const_iterator
std::reverse_iterator< iterator > reverse_iterator
CharIndexedVectorIterator & operator--()
const_iterator begin() const
CharIndexedVectorIterator & operator++()
const T & operator[](const char c) const
type::difference_type difference_type
difference_type operator-(const CharIndexedVectorIterator &rhs) const
type::size_type size_type
boost::array< T, 129 > type
CharIndexedVectorIterator(const iterator &itr)
CharIndexedVectorConstIterator & operator--()
bool operator!=(const CharIndexedVectorIterator &rhs) const
type::value_type value_type
type::const_reference const_reference
CharIndexedVectorConstIterator & operator-=(difference_type _Off)
a wrapper for boost::array that is indexable by character; supports indexes 0-127 ...
CharIndexedVectorConstIterator & operator+=(difference_type _Off)
boost::array< T, 129 > type