Internal: Base packet interpreter class. More...
#include <senf/Packets/PacketInterpreter.hh>
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< iterator > | range |
typedef boost::optional< range > | optional_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::PacketImpl & | impl () 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) |
PacketInterpreterBase * | nextP () |
PacketInterpreterBase * | prevP () |
Protected Member Functions inherited from senf::PacketData | |
PacketData (size_type b, size_type e) | |
detail::PacketImpl & | impl () 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... | |
byte & | operator[] (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 | |
PacketData & | data () |
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 byte & | reference |
typedef byte const & | const_reference |
typedef byte * | pointer |
typedef byte const * | const_pointer |
Protected Types inherited from senf::intrusive_refcount_base | |
typedef unsigned | refcount_t |
Protected Attributes inherited from senf::PacketData | |
detail::PacketImpl * | impl_ |
Need to make this protected so we can change it in the derived class. More... | |
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.
Definition at line 64 of file PacketInterpreter.hh.
Definition at line 61 of file PacketInterpreter.hh.
Definition at line 63 of file PacketInterpreter.hh.
typedef Factory const* senf::PacketInterpreterBase::factory_t |
Definition at line 119 of file PacketInterpreter.hh.
Definition at line 60 of file PacketInterpreter.hh.
Definition at line 68 of file PacketInterpreter.hh.
typedef boost::optional<range> senf::PacketInterpreterBase::optional_range |
Definition at line 67 of file PacketInterpreter.hh.
typedef senf::detail::packet::smart_pointer<PacketInterpreterBase>::ptr_t senf::PacketInterpreterBase::ptr |
Definition at line 58 of file PacketInterpreter.hh.
typedef boost::iterator_range<iterator> senf::PacketInterpreterBase::range |
Definition at line 66 of file PacketInterpreter.hh.
Definition at line 62 of file PacketInterpreter.hh.
Enumerator | |
---|---|
Append |
Definition at line 70 of file PacketInterpreter.hh.
Enumerator | |
---|---|
Prepend |
Definition at line 71 of file PacketInterpreter.hh.
|
virtual |
|
protected |
|
protected |
|
protected |
Annotation& senf::PacketInterpreterBase::annotation | ( | ) |
senf::PacketInterpreterBase::ptr senf::PacketInterpreterBase::append | ( | ptr | packet | ) |
Definition at line 43 of file PacketInterpreter.cc.
|
protected |
|
protected |
PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::as | ( | ) |
void senf::PacketInterpreterBase::clearAnnotations | ( | ) |
senf::PacketInterpreterBase::ptr senf::PacketInterpreterBase::clone | ( | ) |
Definition at line 31 of file PacketInterpreter.cc.
PacketData& senf::PacketInterpreterBase::data | ( | ) |
void senf::PacketInterpreterBase::dump | ( | std::ostream & | os, |
DumpPacketAnnotations_t | dumpAnnotationsSwitch | ||
) |
Definition at line 70 of file PacketInterpreter.cc.
factory_t senf::PacketInterpreterBase::factory | ( | ) |
void senf::PacketInterpreterBase::finalizeThis | ( | ) |
Definition at line 95 of file PacketInterpreter.cc.
void senf::PacketInterpreterBase::finalizeTo | ( | ptr | other | ) |
Definition at line 100 of file PacketInterpreter.cc.
ptr senf::PacketInterpreterBase::first | ( | ) |
detail::PacketImpl& senf::PacketInterpreterBase::impl | ( | ) | const |
ptr senf::PacketInterpreterBase::last | ( | ) |
void senf::PacketInterpreterBase::memDebug | ( | std::ostream & | os | ) |
Definition at line 87 of file PacketInterpreter.cc.
ptr senf::PacketInterpreterBase::next | ( | ) |
|
protected |
optional_range senf::PacketInterpreterBase::nextPacketRange | ( | ) |
factory_t senf::PacketInterpreterBase::nextPacketType | ( | ) |
|
static |
PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::parseNextAs | ( | ) |
ptr senf::PacketInterpreterBase::parseNextAs | ( | ptr const & | self, |
factory_t | factory, | ||
PacketInterpreterBase::optional_range const & | range | ||
) |
ptr senf::PacketInterpreterBase::prev | ( | ) |
|
protected |
void senf::PacketInterpreterBase::reparse | ( | ) |
Definition at line 62 of file PacketInterpreter.cc.
PacketInterpreter<Type>::ptr senf::PacketInterpreterBase::replaceAs | ( | difference_type | offset, |
difference_type | tailOffset | ||
) |
TypeIdValue senf::PacketInterpreterBase::typeId | ( | ) |
|
friend |
|
friend |