senf::ListParser_Container< ListPolicy > Class Template Reference

ListParser container wrapper. More...

#include <senf/Packets/ListParser.hh>

Inheritance diagram for senf::ListParser_Container< ListPolicy >:

Public Types

typedef ListPolicy policy
 
typedef ListPolicy::parser_type parser_type
 
typedef PacketParserBase::data_iterator data_iterator
 
typedef PacketParserBase::size_type size_type
 
typedef PacketParserBase::difference_type difference_type
 
typedef ListPolicy::element_type value_type
 
typedef detail::ListParser_Iterator< ListParser_Containeriterator
 
typedef iterator const_iterator
 
typedef PacketParserBase::state_type state_type
 

Structors and default members

 ListParser_Container (parser_type const &list)
 
 ~ListParser_Container ()
 

Accessors

size_type size () const
 
bool empty () const
 
iterator begin () const
 
iterator end () const
 
value_type front () const
 
value_type back () const
 

Mutators

value_type 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 ListPolicy>
class senf::ListParser_Container< ListPolicy >

ListParser container wrapper.

This is the container wrapper used for list 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::aListCollection_t::container_type c (p->aListCollection());
c.insert(c.begin(), ... );
    \see ListParser

Definition at line 32 of file ListParser.hh.

Member Typedef Documentation

◆ const_iterator

template<class ListPolicy >
typedef iterator senf::ListParser_Container< ListPolicy >::const_iterator

Definition at line 149 of file ListParser.hh.

◆ data_iterator

template<class ListPolicy >
typedef PacketParserBase::data_iterator senf::ListParser_Container< ListPolicy >::data_iterator

Definition at line 144 of file ListParser.hh.

◆ difference_type

template<class ListPolicy >
typedef PacketParserBase::difference_type senf::ListParser_Container< ListPolicy >::difference_type

Definition at line 146 of file ListParser.hh.

◆ iterator

template<class ListPolicy >
typedef detail::ListParser_Iterator<ListParser_Container> senf::ListParser_Container< ListPolicy >::iterator

Definition at line 148 of file ListParser.hh.

◆ parser_type

template<class ListPolicy >
typedef ListPolicy::parser_type senf::ListParser_Container< ListPolicy >::parser_type

Definition at line 143 of file ListParser.hh.

◆ policy

template<class ListPolicy >
typedef ListPolicy senf::ListParser_Container< ListPolicy >::policy

Definition at line 142 of file ListParser.hh.

◆ size_type

template<class ListPolicy >
typedef PacketParserBase::size_type senf::ListParser_Container< ListPolicy >::size_type

Definition at line 145 of file ListParser.hh.

◆ state_type

template<class ListPolicy >
typedef PacketParserBase::state_type senf::ListParser_Container< ListPolicy >::state_type

Definition at line 150 of file ListParser.hh.

◆ value_type

template<class ListPolicy >
typedef ListPolicy::element_type senf::ListParser_Container< ListPolicy >::value_type

Definition at line 147 of file ListParser.hh.

Constructor & Destructor Documentation

◆ ListParser_Container()

template<class ListPolicy >
senf::ListParser_Container< ListPolicy >::ListParser_Container ( parser_type const &  list)

◆ ~ListParser_Container()

template<class ListPolicy >
senf::ListParser_Container< ListPolicy >::~ListParser_Container ( )

Member Function Documentation

◆ back()

template<class ListPolicy >
value_type senf::ListParser_Container< ListPolicy >::back ( ) const

◆ begin()

template<class ListPolicy >
iterator senf::ListParser_Container< ListPolicy >::begin ( ) const

◆ bytes()

template<class ListPolicy >
size_type senf::ListParser_Container< ListPolicy >::bytes ( ) const

◆ clear()

template<class ListPolicy >
void senf::ListParser_Container< ListPolicy >::clear ( )

◆ data()

template<class ListPolicy >
PacketData& senf::ListParser_Container< ListPolicy >::data ( ) const

◆ empty()

template<class ListPolicy >
bool senf::ListParser_Container< ListPolicy >::empty ( ) const

◆ end()

template<class ListPolicy >
iterator senf::ListParser_Container< ListPolicy >::end ( ) const

◆ erase() [1/2]

template<class ListPolicy >
void senf::ListParser_Container< ListPolicy >::erase ( iterator  pos,
size_type  n = 1 
)

◆ erase() [2/2]

template<class ListPolicy >
void senf::ListParser_Container< ListPolicy >::erase ( iterator  f,
iterator  l 
)

◆ front()

template<class ListPolicy >
value_type senf::ListParser_Container< ListPolicy >::front ( ) const

◆ i()

template<class ListPolicy >
data_iterator senf::ListParser_Container< ListPolicy >::i ( ) const

◆ init()

template<class ListPolicy >
void senf::ListParser_Container< ListPolicy >::init ( ) const

◆ insert() [1/3]

template<class ListPolicy >
template<class Value >
void senf::ListParser_Container< ListPolicy >::insert ( iterator  pos,
Value const &  t 
)

◆ insert() [2/3]

template<class ListPolicy >
template<class Value >
void senf::ListParser_Container< ListPolicy >::insert ( iterator  pos,
size_type  n,
Value const &  t 
)

◆ insert() [3/3]

template<class ListPolicy >
template<class ForwardIterator >
void senf::ListParser_Container< ListPolicy >::insert ( iterator  pos,
ForwardIterator  f,
ForwardIterator  l 
)

◆ parser()

template<class ListPolicy >
parser_type senf::ListParser_Container< ListPolicy >::parser ( ) const

◆ push_back()

template<class ListPolicy >
template<class Value >
void senf::ListParser_Container< ListPolicy >::push_back ( Value const &  value,
size_type  n = 1 
)

◆ push_back_space()

template<class ListPolicy >
value_type senf::ListParser_Container< ListPolicy >::push_back_space ( size_type  n = 1)

◆ push_front()

template<class ListPolicy >
template<class Value >
void senf::ListParser_Container< ListPolicy >::push_front ( Value const &  value,
size_type  n = 1 
)

◆ push_front_space()

template<class ListPolicy >
value_type senf::ListParser_Container< ListPolicy >::push_front_space ( size_type  n = 1)

◆ resize() [1/2]

template<class ListPolicy >
void senf::ListParser_Container< ListPolicy >::resize ( size_type  n)

◆ resize() [2/2]

template<class ListPolicy >
template<class Value >
void senf::ListParser_Container< ListPolicy >::resize ( size_type  n,
Value  value 
)

◆ shift()

template<class ListPolicy >
value_type senf::ListParser_Container< ListPolicy >::shift ( iterator  pos,
size_type  n = 1 
)

◆ size()

template<class ListPolicy >
size_type senf::ListParser_Container< ListPolicy >::size ( ) const

◆ state()

template<class ListPolicy >
state_type senf::ListParser_Container< ListPolicy >::state ( ) const

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