Internal: Packet data storage. More...

#include <senf/Packets/PacketImpl.hh>

Inheritance diagram for senf::detail::PacketImpl:

Classes

struct  Guard
 Internal: Keep PacketImpl instance alive. More...
 

Public Types

typedef senf::detail::packet::byte byte
 
typedef senf::detail::packet::raw_container raw_container
 
typedef senf::detail::packet::size_type size_type
 
typedef senf::detail::packet::difference_type difference_type
 
typedef senf::detail::packet::interpreter_list interpreter_list
 
typedef senf::detail::packet::iterator iterator
 
typedef senf::detail::packet::const_iterator const_iterator
 
typedef senf::detail::packet::refcount_t refcount_t
 

Public Member Functions

 PacketImpl ()
 
 PacketImpl (size_type size, byte initValue)
 
template<class InputIterator >
 PacketImpl (InputIterator b, InputIterator e)
 
 PacketImpl (byte *data, size_type size, size_type chunkSize=0u, size_type offset=0u)
 
 ~PacketImpl ()
 
void add_ref ()
 
bool release ()
 
refcount_t refcount () const
 
PacketInterpreterBasefirst ()
 
PacketInterpreterBaselast ()
 
PacketInterpreterBasenext (PacketInterpreterBase *p)
 
PacketInterpreterBaseprev (PacketInterpreterBase *p)
 
void * allocateInterpreter ()
 
void deallocateInterpreter (void *address)
 
bool usingExternalMemory () const
 
void releaseExternalMemory ()
 
void memDebug (std::ostream &os)
 
void appendInterpreter (PacketInterpreterBase *p)
 
void prependInterpreter (PacketInterpreterBase *p)
 
void prependInterpreter (PacketInterpreterBase *p, PacketInterpreterBase *before)
 
void truncateInterpreters (PacketInterpreterBase *p)
 
void truncateInterpretersBackwards (PacketInterpreterBase *p)
 
void clearInterpreters ()
 
iterator begin ()
 
iterator end ()
 
size_type size ()
 
void insert (PacketData *self, iterator pos, byte v)
 
void insert (PacketData *self, iterator pos, size_type n, byte v)
 
template<class ForwardIterator >
void insert (PacketData *self, iterator pos, ForwardIterator f, ForwardIterator l)
 
void erase (PacketData *self, iterator pos)
 
void erase (PacketData *self, iterator first, iterator last)
 
void truncateDataBackwards (PacketData *self, iterator pos)
 
iterator truncateRawDataBackwards (iterator pos)
 
void truncateRawDataForward (iterator pos)
 
void clear (PacketData *self)
 
template<class Annotation >
Annotation & annotation ()
 
void clearAnnotations ()
 
void assignAnnotations (PacketImpl const &other)
 
void dumpAnnotations (std::ostream &os)
 

Static Public Member Functions

static size_type maxPreallocHigh ()
 
static size_type maxPreallocHeapcount ()
 
- Static Public Member Functions inherited from senf::pool_alloc_mixin< PacketImpl >
static void * operator new (size_t size)
 
static void operator delete (void *p, size_t size)
 

Detailed Description

Internal: Packet data storage.

This is the class holding the packet data and the interpreter chain. All manipulations of the packet data are performed via the interface exported here. This is very important, since PacketImpl will update the interpreters (that is the vector indices stored therein) whenever the data is changed.

Definition at line 112 of file PacketImpl.hh.

Member Typedef Documentation

◆ byte

◆ const_iterator

◆ difference_type

◆ interpreter_list

◆ iterator

◆ raw_container

◆ refcount_t

◆ size_type

Constructor & Destructor Documentation

◆ PacketImpl() [1/4]

senf::detail::PacketImpl::PacketImpl ( )

◆ PacketImpl() [2/4]

senf::detail::PacketImpl::PacketImpl ( size_type  size,
byte  initValue 
)

◆ PacketImpl() [3/4]

template<class InputIterator >
senf::detail::PacketImpl::PacketImpl ( InputIterator  b,
InputIterator  e 
)

◆ PacketImpl() [4/4]

senf::detail::PacketImpl::PacketImpl ( byte data,
size_type  size,
size_type  chunkSize = 0u,
size_type  offset = 0u 
)

◆ ~PacketImpl()

senf::detail::PacketImpl::~PacketImpl ( )

Member Function Documentation

◆ add_ref()

void senf::detail::PacketImpl::add_ref ( )

◆ allocateInterpreter()

void* senf::detail::PacketImpl::allocateInterpreter ( )

◆ annotation()

template<class Annotation >
Annotation& senf::detail::PacketImpl::annotation ( )

◆ appendInterpreter()

void senf::detail::PacketImpl::appendInterpreter ( PacketInterpreterBase p)

Definition at line 186 of file PacketImpl.cc.

◆ assignAnnotations()

void senf::detail::PacketImpl::assignAnnotations ( PacketImpl const &  other)

Definition at line 288 of file PacketImpl.cc.

◆ begin()

iterator senf::detail::PacketImpl::begin ( )

◆ clear()

void senf::detail::PacketImpl::clear ( PacketData self)

Definition at line 208 of file PacketImpl.cc.

◆ clearAnnotations()

void senf::detail::PacketImpl::clearAnnotations ( )

Definition at line 280 of file PacketImpl.cc.

◆ clearInterpreters()

void senf::detail::PacketImpl::clearInterpreters ( )

◆ deallocateInterpreter()

void senf::detail::PacketImpl::deallocateInterpreter ( void *  address)

◆ dumpAnnotations()

void senf::detail::PacketImpl::dumpAnnotations ( std::ostream &  os)

Definition at line 270 of file PacketImpl.cc.

◆ end()

iterator senf::detail::PacketImpl::end ( )

◆ erase() [1/2]

void senf::detail::PacketImpl::erase ( PacketData self,
iterator  pos 
)

◆ erase() [2/2]

void senf::detail::PacketImpl::erase ( PacketData self,
iterator  first,
iterator  last 
)

◆ first()

PacketInterpreterBase* senf::detail::PacketImpl::first ( )

◆ insert() [1/3]

void senf::detail::PacketImpl::insert ( PacketData self,
iterator  pos,
byte  v 
)

◆ insert() [2/3]

void senf::detail::PacketImpl::insert ( PacketData self,
iterator  pos,
size_type  n,
byte  v 
)

◆ insert() [3/3]

template<class ForwardIterator >
void senf::detail::PacketImpl::insert ( PacketData self,
iterator  pos,
ForwardIterator  f,
ForwardIterator  l 
)

◆ last()

PacketInterpreterBase* senf::detail::PacketImpl::last ( )

◆ maxPreallocHeapcount()

static size_type senf::detail::PacketImpl::maxPreallocHeapcount ( )
static

◆ maxPreallocHigh()

static size_type senf::detail::PacketImpl::maxPreallocHigh ( )
static

◆ memDebug()

void senf::detail::PacketImpl::memDebug ( std::ostream &  os)

Definition at line 138 of file PacketImpl.cc.

◆ next()

PacketInterpreterBase* senf::detail::PacketImpl::next ( PacketInterpreterBase p)

◆ prependInterpreter() [1/2]

void senf::detail::PacketImpl::prependInterpreter ( PacketInterpreterBase p)

Definition at line 192 of file PacketImpl.cc.

◆ prependInterpreter() [2/2]

void senf::detail::PacketImpl::prependInterpreter ( PacketInterpreterBase p,
PacketInterpreterBase before 
)

Definition at line 198 of file PacketImpl.cc.

◆ prev()

PacketInterpreterBase* senf::detail::PacketImpl::prev ( PacketInterpreterBase p)

◆ refcount()

refcount_t senf::detail::PacketImpl::refcount ( ) const

◆ release()

bool senf::detail::PacketImpl::release ( )

Definition at line 120 of file PacketImpl.cc.

◆ releaseExternalMemory()

void senf::detail::PacketImpl::releaseExternalMemory ( )

◆ size()

size_type senf::detail::PacketImpl::size ( )

◆ truncateDataBackwards()

void senf::detail::PacketImpl::truncateDataBackwards ( PacketData self,
iterator  pos 
)

◆ truncateInterpreters()

void senf::detail::PacketImpl::truncateInterpreters ( PacketInterpreterBase p)

◆ truncateInterpretersBackwards()

void senf::detail::PacketImpl::truncateInterpretersBackwards ( PacketInterpreterBase p)

◆ truncateRawDataBackwards()

iterator senf::detail::PacketImpl::truncateRawDataBackwards ( iterator  pos)

◆ truncateRawDataForward()

void senf::detail::PacketImpl::truncateRawDataForward ( iterator  pos)

◆ usingExternalMemory()

bool senf::detail::PacketImpl::usingExternalMemory ( ) const

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