senf::PacketInterpreterBase Class Referenceabstract

Internal: Base packet interpreter class. More...

#include <senf/Packets/PacketInterpreter.hh>

Inheritance diagram for senf::PacketInterpreterBase:

Classes

struct  Factory
 Internal: Abstract packet factory. More...
 

Public Types

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

detail::PacketImplimpl () const
 
- Public Member Functions inherited from senf::intrusive_refcount_base
virtual ~intrusive_refcount_base ()
 
refcount_t refcount () const
 
bool is_shared () const
 

Protected Member Functions

 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
 

Friends

void senf::intrusive_ptr_add_ref (PacketInterpreterBase const *)
 
void senf::intrusive_ptr_release (PacketInterpreterBase const *)
 

Structors and default members

virtual ~PacketInterpreterBase ()
 
ptr clone ()
 
static factory_t no_factory ()
 

Interpreter chain access

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)
 

Data access

PacketDatadata ()
 

Annotations

template<class Annotation >
Annotation & annotation ()
 
void clearAnnotations ()
 

Access to the abstract interface

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 ()
 

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 Attributes inherited from senf::PacketData
detail::PacketImplimpl_
 Need to make this protected so we can change it in the derived class. More...
 

Detailed Description

Internal: Base packet interpreter class.

This is the base class for the persistent interpreter. This class encapsulates all the functionality accessible via the packet handle, most handle operations are just forwarded.

Definition at line 49 of file PacketInterpreter.hh.

Member Typedef Documentation

◆ byte

◆ const_iterator

◆ difference_type

◆ factory_t

Definition at line 119 of file PacketInterpreter.hh.

◆ iterator

◆ no_range

◆ optional_range

Definition at line 67 of file PacketInterpreter.hh.

◆ ptr

◆ range

typedef boost::iterator_range<iterator> senf::PacketInterpreterBase::range

Definition at line 66 of file PacketInterpreter.hh.

◆ size_type

Member Enumeration Documentation

◆ Append_t

Enumerator
Append 

Definition at line 70 of file PacketInterpreter.hh.

◆ Prepend_t

Enumerator
Prepend 

Definition at line 71 of file PacketInterpreter.hh.

Constructor & Destructor Documentation

◆ ~PacketInterpreterBase()

virtual senf::PacketInterpreterBase::~PacketInterpreterBase ( )
virtual

◆ PacketInterpreterBase() [1/3]

senf::PacketInterpreterBase::PacketInterpreterBase ( detail::PacketImpl impl,
iterator  b,
iterator  e,
Append_t   
)
protected

◆ PacketInterpreterBase() [2/3]

senf::PacketInterpreterBase::PacketInterpreterBase ( detail::PacketImpl impl,
iterator  b,
iterator  e,
Prepend_t   
)
protected

◆ PacketInterpreterBase() [3/3]

senf::PacketInterpreterBase::PacketInterpreterBase ( detail::PacketImpl impl,
iterator  b,
iterator  e,
ptr  before 
)
protected

Member Function Documentation

◆ annotation()

template<class Annotation >
Annotation& senf::PacketInterpreterBase::annotation ( )

◆ append()

senf::PacketInterpreterBase::ptr senf::PacketInterpreterBase::append ( ptr  packet)

Definition at line 43 of file PacketInterpreter.cc.

◆ appendClone() [1/2]

ptr senf::PacketInterpreterBase::appendClone ( detail::PacketImpl impl,
iterator  base,
iterator  new_base 
)
protected

◆ appendClone() [2/2]

ptr senf::PacketInterpreterBase::appendClone ( detail::PacketImpl impl,
range  r 
)
protected

◆ as()

template<class Type >
PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::as ( )

◆ clearAnnotations()

void senf::PacketInterpreterBase::clearAnnotations ( )

◆ clone()

senf::PacketInterpreterBase::ptr senf::PacketInterpreterBase::clone ( )

Definition at line 31 of file PacketInterpreter.cc.

◆ data()

PacketData& senf::PacketInterpreterBase::data ( )

◆ dump()

void senf::PacketInterpreterBase::dump ( std::ostream &  os,
DumpPacketAnnotations_t  dumpAnnotationsSwitch 
)

Definition at line 70 of file PacketInterpreter.cc.

◆ factory()

factory_t senf::PacketInterpreterBase::factory ( )

◆ finalizeThis()

void senf::PacketInterpreterBase::finalizeThis ( )

Definition at line 95 of file PacketInterpreter.cc.

◆ finalizeTo()

void senf::PacketInterpreterBase::finalizeTo ( ptr  other)

Definition at line 100 of file PacketInterpreter.cc.

◆ first()

ptr senf::PacketInterpreterBase::first ( )

◆ impl()

detail::PacketImpl& senf::PacketInterpreterBase::impl ( ) const

◆ last()

ptr senf::PacketInterpreterBase::last ( )

◆ memDebug()

void senf::PacketInterpreterBase::memDebug ( std::ostream &  os)

Definition at line 87 of file PacketInterpreter.cc.

◆ next()

ptr senf::PacketInterpreterBase::next ( )

◆ nextP()

PacketInterpreterBase* senf::PacketInterpreterBase::nextP ( )
protected

◆ nextPacketRange()

optional_range senf::PacketInterpreterBase::nextPacketRange ( )

◆ nextPacketType()

factory_t senf::PacketInterpreterBase::nextPacketType ( )

◆ no_factory()

static factory_t senf::PacketInterpreterBase::no_factory ( )
static

◆ parseNextAs() [1/2]

template<class Type >
PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::parseNextAs ( )

◆ parseNextAs() [2/2]

ptr senf::PacketInterpreterBase::parseNextAs ( ptr const &  self,
factory_t  factory,
PacketInterpreterBase::optional_range const &  range 
)

◆ prev()

ptr senf::PacketInterpreterBase::prev ( )

◆ prevP()

PacketInterpreterBase* senf::PacketInterpreterBase::prevP ( )
protected

◆ reparse()

void senf::PacketInterpreterBase::reparse ( )

Definition at line 62 of file PacketInterpreter.cc.

◆ replaceAs()

template<class Type >
PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::replaceAs ( difference_type  offset,
difference_type  tailOffset 
)

◆ typeId()

TypeIdValue senf::PacketInterpreterBase::typeId ( )

Friends And Related Function Documentation

◆ senf::intrusive_ptr_add_ref

◆ senf::intrusive_ptr_release


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