senf::VectorParser_Container< ElementParser, AuxPolicy > Class Template Reference

VectorParser container wrapper. More...

#include <senf/Packets/VectorParser.hh>

Inheritance diagram for senf::VectorParser_Container< ElementParser, AuxPolicy >:

Public Types

typedef VectorParser< ElementParser, AuxPolicy > parser_type
 
typedef PacketParserBase::data_iterator data_iterator
 
typedef PacketParserBase::size_type size_type
 
typedef PacketParserBase::difference_type difference_type
 
typedef ElementParser value_type
 
typedef detail::ArrayParser_iterator< value_typeiterator
 
typedef iterator const_iterator
 
typedef PacketParserBase::state_type state_type
 

Structors and default members

 VectorParser_Container (parser_type const &vector)
 

Accessors

size_type size () const
 
bool empty () const
 
iterator begin () const
 
iterator end () const
 
value_type operator[] (difference_type i) const
 
value_type front () const
 
value_type back () const
 

Mutators

iterator shift (iterator pos, size_type n=1)
 
template<class Value >
void insert (iterator pos, Value const &t)
 
template<class Value >
void insert (iterator pos, size_type n, Value const &t)
 
template<class ForwardIterator >
void insert (iterator pos, ForwardIterator f, ForwardIterator l)
 
void erase (iterator pos, size_type n=1)
 
void erase (iterator f, iterator l)
 
void clear ()
 
template<class Value >
void push_back (Value const &value, size_type n=1)
 
value_type push_back_space (size_type n=1)
 
template<class Value >
void push_front (Value const &value, size_type n=1)
 
value_type push_front_space (size_type n=1)
 
void resize (size_type n)
 
template<class Value >
void resize (size_type n, Value value)
 

Parser interface

parser_type parser () const
 
data_iterator i () const
 
state_type state () const
 
PacketDatadata () const
 
size_type bytes () const
 
void init () const
 

Detailed Description

template<class ElementParser, class AuxPolicy>
class senf::VectorParser_Container< ElementParser, AuxPolicy >

VectorParser container wrapper.

This is the container wrapper used for vector parsers. The container wrapper will stay valid after changing the collection. However the container still depends on the packet and will be invalidated if the Packet is deallocated or if the packet size is changed from without the container wrapper (more precisely, it is invalidated if the insertion/deletion happens before the vector in the packet data).

The vector container wrapper provides a complete STL random-access sequence interface.

SomePacket p (...);
SomePacket::aVectorCollection_t::container_type c (p->aVectorCollection());
c.insert(c.begin(), ... );
    \see VectorParser

Definition at line 31 of file VectorParser.hh.

Member Typedef Documentation

◆ const_iterator

template<class ElementParser , class AuxPolicy >
typedef iterator senf::VectorParser_Container< ElementParser, AuxPolicy >::const_iterator

Definition at line 146 of file VectorParser.hh.

◆ data_iterator

template<class ElementParser , class AuxPolicy >
typedef PacketParserBase::data_iterator senf::VectorParser_Container< ElementParser, AuxPolicy >::data_iterator

Definition at line 141 of file VectorParser.hh.

◆ difference_type

template<class ElementParser , class AuxPolicy >
typedef PacketParserBase::difference_type senf::VectorParser_Container< ElementParser, AuxPolicy >::difference_type

Definition at line 143 of file VectorParser.hh.

◆ iterator

template<class ElementParser , class AuxPolicy >
typedef detail::ArrayParser_iterator<value_type> senf::VectorParser_Container< ElementParser, AuxPolicy >::iterator

Definition at line 145 of file VectorParser.hh.

◆ parser_type

template<class ElementParser , class AuxPolicy >
typedef VectorParser<ElementParser,AuxPolicy> senf::VectorParser_Container< ElementParser, AuxPolicy >::parser_type

Definition at line 140 of file VectorParser.hh.

◆ size_type

template<class ElementParser , class AuxPolicy >
typedef PacketParserBase::size_type senf::VectorParser_Container< ElementParser, AuxPolicy >::size_type

Definition at line 142 of file VectorParser.hh.

◆ state_type

template<class ElementParser , class AuxPolicy >
typedef PacketParserBase::state_type senf::VectorParser_Container< ElementParser, AuxPolicy >::state_type

Definition at line 147 of file VectorParser.hh.

◆ value_type

template<class ElementParser , class AuxPolicy >
typedef ElementParser senf::VectorParser_Container< ElementParser, AuxPolicy >::value_type

Definition at line 144 of file VectorParser.hh.

Constructor & Destructor Documentation

◆ VectorParser_Container()

template<class ElementParser , class AuxPolicy >
senf::VectorParser_Container< ElementParser, AuxPolicy >::VectorParser_Container ( parser_type const &  vector)

Member Function Documentation

◆ back()

template<class ElementParser , class AuxPolicy >
value_type senf::VectorParser_Container< ElementParser, AuxPolicy >::back ( ) const

◆ begin()

template<class ElementParser , class AuxPolicy >
iterator senf::VectorParser_Container< ElementParser, AuxPolicy >::begin ( ) const

◆ bytes()

template<class ElementParser , class AuxPolicy >
size_type senf::VectorParser_Container< ElementParser, AuxPolicy >::bytes ( ) const

◆ clear()

template<class ElementParser , class AuxPolicy >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::clear ( )

◆ data()

template<class ElementParser , class AuxPolicy >
PacketData& senf::VectorParser_Container< ElementParser, AuxPolicy >::data ( ) const

◆ empty()

template<class ElementParser , class AuxPolicy >
bool senf::VectorParser_Container< ElementParser, AuxPolicy >::empty ( ) const

◆ end()

template<class ElementParser , class AuxPolicy >
iterator senf::VectorParser_Container< ElementParser, AuxPolicy >::end ( ) const

◆ erase() [1/2]

template<class ElementParser , class AuxPolicy >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::erase ( iterator  pos,
size_type  n = 1 
)

◆ erase() [2/2]

template<class ElementParser , class AuxPolicy >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::erase ( iterator  f,
iterator  l 
)

◆ front()

template<class ElementParser , class AuxPolicy >
value_type senf::VectorParser_Container< ElementParser, AuxPolicy >::front ( ) const

◆ i()

template<class ElementParser , class AuxPolicy >
data_iterator senf::VectorParser_Container< ElementParser, AuxPolicy >::i ( ) const

◆ init()

template<class ElementParser , class AuxPolicy >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::init ( ) const

◆ insert() [1/3]

template<class ElementParser , class AuxPolicy >
template<class Value >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::insert ( iterator  pos,
Value const &  t 
)

◆ insert() [2/3]

template<class ElementParser , class AuxPolicy >
template<class Value >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::insert ( iterator  pos,
size_type  n,
Value const &  t 
)

◆ insert() [3/3]

template<class ElementParser , class AuxPolicy >
template<class ForwardIterator >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::insert ( iterator  pos,
ForwardIterator  f,
ForwardIterator  l 
)

◆ operator[]()

template<class ElementParser , class AuxPolicy >
value_type senf::VectorParser_Container< ElementParser, AuxPolicy >::operator[] ( difference_type  i) const

◆ parser()

template<class ElementParser , class AuxPolicy >
parser_type senf::VectorParser_Container< ElementParser, AuxPolicy >::parser ( ) const

◆ push_back()

template<class ElementParser , class AuxPolicy >
template<class Value >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::push_back ( Value const &  value,
size_type  n = 1 
)

◆ push_back_space()

template<class ElementParser , class AuxPolicy >
value_type senf::VectorParser_Container< ElementParser, AuxPolicy >::push_back_space ( size_type  n = 1)

◆ push_front()

template<class ElementParser , class AuxPolicy >
template<class Value >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::push_front ( Value const &  value,
size_type  n = 1 
)

◆ push_front_space()

template<class ElementParser , class AuxPolicy >
value_type senf::VectorParser_Container< ElementParser, AuxPolicy >::push_front_space ( size_type  n = 1)

◆ resize() [1/2]

template<class ElementParser , class AuxPolicy >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::resize ( size_type  n)

◆ resize() [2/2]

template<class ElementParser , class AuxPolicy >
template<class Value >
void senf::VectorParser_Container< ElementParser, AuxPolicy >::resize ( size_type  n,
Value  value 
)

◆ shift()

template<class ElementParser , class AuxPolicy >
iterator senf::VectorParser_Container< ElementParser, AuxPolicy >::shift ( iterator  pos,
size_type  n = 1 
)

◆ size()

template<class ElementParser , class AuxPolicy >
size_type senf::VectorParser_Container< ElementParser, AuxPolicy >::size ( ) const

◆ state()

template<class ElementParser , class AuxPolicy >
state_type senf::VectorParser_Container< ElementParser, AuxPolicy >::state ( ) const

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