senf::PacketInterpreter< PacketType > Class Template Reference

Internal: Concrete packet interpreter. More...

#include <senf/Packets/PacketImpl.hh>

Inheritance diagram for senf::PacketInterpreter< PacketType >:

Public Types

typedef senf::detail::packet::smart_pointer< PacketInterpreter >::ptr_t ptr
 
typedef PacketType type
 
typedef type::parser parser
 
- Public Types inherited from senf::PacketInterpreterBase
enum  Append_t { Append }
 
enum  Prepend_t { Prepend }
 
typedef senf::detail::packet::smart_pointer< PacketInterpreterBase >::ptr_t ptr
 
typedef senf::detail::packet::iterator iterator
 
typedef senf::detail::packet::const_iterator const_iterator
 
typedef senf::detail::packet::size_type size_type
 
typedef senf::detail::packet::difference_type difference_type
 
typedef senf::detail::packet::byte byte
 
typedef boost::iterator_range< iteratorrange
 
typedef boost::optional< rangeoptional_range
 
typedef optional_range no_range
 
typedef Factory const * factory_t
 
- Public Types inherited from senf::intrusive_refcount_base
typedef unsigned refcount_t
 

Public Member Functions

parser fields ()
 
- Public Member Functions inherited from senf::PacketInterpreterBase
detail::PacketImplimpl () const
 
virtual ~PacketInterpreterBase ()
 
ptr clone ()
 
ptr next ()
 
ptr prev ()
 
ptr first ()
 
ptr last ()
 
template<class Type >
PacketInterpreter< Type >::ptr parseNextAs ()
 
ptr parseNextAs (ptr const &self, factory_t factory, PacketInterpreterBase::optional_range const &range)
 
template<class Type >
PacketInterpreter< Type >::ptr as ()
 
ptr append (ptr packet)
 
void reparse ()
 
template<class Type >
PacketInterpreter< Type >::ptr replaceAs (difference_type offset, difference_type tailOffset)
 
PacketDatadata ()
 
template<class Annotation >
Annotation & annotation ()
 
void clearAnnotations ()
 
optional_range nextPacketRange ()
 
void finalizeThis ()
 
void finalizeTo (ptr other)
 
void dump (std::ostream &os, DumpPacketAnnotations_t dumpAnnotationsSwitch)
 
void memDebug (std::ostream &os)
 
TypeIdValue typeId ()
 
factory_t factory ()
 
factory_t nextPacketType ()
 
- Public Member Functions inherited from senf::intrusive_refcount_base
virtual ~intrusive_refcount_base ()
 
refcount_t refcount () const
 
bool is_shared () const
 

Static Public Member Functions

static size_type initSize ()
 
static size_type initHeadSize ()
 
- Static Public Member Functions inherited from senf::PacketInterpreterBase
static factory_t no_factory ()
 

Structors and default members

static factory_t factory ()
 
static ptr create ()
 
static ptr create (senf::NoInit_t)
 
static ptr create (size_type size)
 
static ptr create (size_type size, senf::NoInit_t)
 
template<class ForwardReadableRange >
static ptr create (ForwardReadableRange const &range)
 
static ptr create (byte *data, size_type size, size_type chunkSize=0u, size_type offset=0u)
 
static ptr createAfter (PacketInterpreterBase::ptr const &packet)
 
static ptr createAfter (PacketInterpreterBase::ptr const &packet, senf::NoInit_t)
 
static ptr createAfter (PacketInterpreterBase::ptr const &packet, size_type size)
 
static ptr createAfter (PacketInterpreterBase::ptr const &packet, size_type size, senf::NoInit_t)
 
template<class ForwardReadableRange >
static ptr createAfter (PacketInterpreterBase::ptr const &packet, ForwardReadableRange const &range)
 
static ptr createBefore (PacketInterpreterBase::ptr const &spacket)
 
static ptr createBeforeNoZero (PacketInterpreterBase::ptr const &spacket)
 
static ptr createBefore (PacketInterpreterBase::ptr const &packet, senf::NoInit_t, size_type space=0, size_type tailSpace=0)
 
static ptr createInsertBefore (PacketInterpreterBase::ptr const &packet)
 
static ptr createInsertBefore (PacketInterpreterBase::ptr const &packet, senf::NoInit_t)
 
ptr clone ()
 

Additional Inherited Members

- Protected Types inherited from senf::PacketData
typedef senf::detail::packet::iterator iterator
 
typedef senf::detail::packet::const_iterator const_iterator
 
typedef senf::detail::packet::size_type size_type
 
typedef senf::detail::packet::difference_type difference_type
 
typedef senf::detail::packet::byte byte
 
typedef byte value_type
 
typedef bytereference
 
typedef byte const & const_reference
 
typedef bytepointer
 
typedef byte const * const_pointer
 
- Protected Types inherited from senf::intrusive_refcount_base
typedef unsigned refcount_t
 
- Protected Member Functions inherited from senf::PacketInterpreterBase
 PacketInterpreterBase (detail::PacketImpl *impl, iterator b, iterator e, Append_t)
 
 PacketInterpreterBase (detail::PacketImpl *impl, iterator b, iterator e, Prepend_t)
 
 PacketInterpreterBase (detail::PacketImpl *impl, iterator b, iterator e, ptr before)
 
ptr appendClone (detail::PacketImpl *impl, iterator base, iterator new_base)
 
ptr appendClone (detail::PacketImpl *impl, range r)
 
PacketInterpreterBasenextP ()
 
PacketInterpreterBaseprevP ()
 
- Protected Member Functions inherited from senf::PacketData
 PacketData (size_type b, size_type e)
 
detail::PacketImplimpl () const
 
bool valid ()
 
iterator begin () const
 Return iterator to beginning. More...
 
iterator end () const
 Return iterator to end. More...
 
size_type size () const
 Returns the number of bytes in the packet data. More...
 
bool empty () const
 Test whether the packet data is empty. More...
 
byte operator[] (size_type n) const
 Access byte in the packet data. More...
 
byteoperator[] (size_type n)
 Access byte in the packet data. More...
 
void insert (iterator pos, byte v)
 
void insert (iterator pos, size_type n, byte v)
 
template<class InputIterator >
void insert (iterator pos, InputIterator f, InputIterator l)
 
void erase (iterator pos)
 
void erase (iterator first, iterator last)
 
void clear ()
 All bytes of the packet data dropped, leaving the container with a size of 0. */. More...
 
void zero (iterator first, iterator last)
 
void resize (size_type n, byte v=0)
 
bool usingExternalMemory () const
 Check for external memory usage. More...
 
void releaseExternalMemory ()
 Release external memory. More...
 
- Protected Member Functions inherited from senf::intrusive_refcount_t< PacketInterpreterBase >
 intrusive_refcount_t ()
 
- Protected Member Functions inherited from senf::intrusive_refcount_base
 intrusive_refcount_base ()
 
void add_ref ()
 
bool release ()
 
virtual ~intrusive_refcount_base ()
 
refcount_t refcount () const
 
bool is_shared () const
 
- Protected Attributes inherited from senf::PacketData
detail::PacketImplimpl_
 Need to make this protected so we can change it in the derived class. More...
 

Detailed Description

template<class PacketType>
class senf::PacketInterpreter< PacketType >

Internal: Concrete packet interpreter.

Instantiations of this class build the interpreter chain. This class is accessed by the packet handles. It provides the packet-type specific functionality in addition to the interface defined in the PacketInterpreterBase class.

See also
PacketTypeBase for the PacketType interface

Definition at line 99 of file PacketImpl.hh.

Member Typedef Documentation

◆ parser

template<class PacketType>
typedef type::parser senf::PacketInterpreter< PacketType >::parser

Definition at line 264 of file PacketInterpreter.hh.

◆ ptr

template<class PacketType>
typedef senf::detail::packet::smart_pointer< PacketInterpreter>::ptr_t senf::PacketInterpreter< PacketType >::ptr

Definition at line 262 of file PacketInterpreter.hh.

◆ type

template<class PacketType>
typedef PacketType senf::PacketInterpreter< PacketType >::type

Definition at line 263 of file PacketInterpreter.hh.

Member Function Documentation

◆ clone()

template<class PacketType>
ptr senf::PacketInterpreter< PacketType >::clone ( )

◆ create() [1/6]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::create ( )
static

◆ create() [2/6]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::create ( senf::NoInit_t  )
static

◆ create() [3/6]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::create ( size_type  size)
static

◆ create() [4/6]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::create ( size_type  size,
senf::NoInit_t   
)
static

◆ create() [5/6]

template<class PacketType>
template<class ForwardReadableRange >
static ptr senf::PacketInterpreter< PacketType >::create ( ForwardReadableRange const &  range)
static

◆ create() [6/6]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::create ( byte data,
size_type  size,
size_type  chunkSize = 0u,
size_type  offset = 0u 
)
static

◆ createAfter() [1/5]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createAfter ( PacketInterpreterBase::ptr const &  packet)
static

◆ createAfter() [2/5]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createAfter ( PacketInterpreterBase::ptr const &  packet,
senf::NoInit_t   
)
static

◆ createAfter() [3/5]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createAfter ( PacketInterpreterBase::ptr const &  packet,
size_type  size 
)
static

◆ createAfter() [4/5]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createAfter ( PacketInterpreterBase::ptr const &  packet,
size_type  size,
senf::NoInit_t   
)
static

◆ createAfter() [5/5]

template<class PacketType>
template<class ForwardReadableRange >
static ptr senf::PacketInterpreter< PacketType >::createAfter ( PacketInterpreterBase::ptr const &  packet,
ForwardReadableRange const &  range 
)
static

◆ createBefore() [1/2]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createBefore ( PacketInterpreterBase::ptr const &  spacket)
static

◆ createBefore() [2/2]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createBefore ( PacketInterpreterBase::ptr const &  packet,
senf::NoInit_t  ,
size_type  space = 0,
size_type  tailSpace = 0 
)
static

◆ createBeforeNoZero()

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createBeforeNoZero ( PacketInterpreterBase::ptr const &  spacket)
static

◆ createInsertBefore() [1/2]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createInsertBefore ( PacketInterpreterBase::ptr const &  packet)
static

◆ createInsertBefore() [2/2]

template<class PacketType>
static ptr senf::PacketInterpreter< PacketType >::createInsertBefore ( PacketInterpreterBase::ptr const &  packet,
senf::NoInit_t   
)
static

◆ factory()

template<class PacketType>
static factory_t senf::PacketInterpreter< PacketType >::factory ( )
static

◆ fields()

template<class PacketType>
parser senf::PacketInterpreter< PacketType >::fields ( )

◆ initHeadSize()

template<class PacketType>
static size_type senf::PacketInterpreter< PacketType >::initHeadSize ( )
static

◆ initSize()

template<class PacketType>
static size_type senf::PacketInterpreter< PacketType >::initSize ( )
static

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