#define HH_SENF_Packets_PacketInterpreter_ 1
// Custom includes
-#include <boost/intrusive/ilist.hpp>
+#include <senf/boost_intrusive/ilist.hpp>
#include <boost/optional.hpp>
#include <boost/range.hpp>
#include <senf/Utils/intrusive_refcount.hh>
#include <senf/Utils/TypeIdValue.hh>
//#include "PacketInterpreter.mpp"
-///////////////////////////////hh.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
public intrusive_refcount_t<PacketInterpreterBase>
{
public:
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
// Types
typedef senf::detail::packet::smart_pointer<
typedef Factory const * factory_t;
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
///\name Structors and default members
- ///@{
+ //\{
// protected constructors
// no copy
ptr clone();
- ///@}
- ///////////////////////////////////////////////////////////////////////////
+ //\}
+ //-////////////////////////////////////////////////////////////////////////
///\name Interpreter chain access
- ///@{
+ //\{
ptr next();
ptr prev();
ptr append(ptr packet);
- ///@}
+ void reparse();
+
+ //\}
///\name Data access
- ///@{
+ //\{
using PacketData::valid;
PacketData & data();
- ///@}
+ //\}
///\name Annotations
- ///@{
+ //\{
template <class Annotation>
Annotation & annotation();
- ///@}
+ void clearAnnotations();
+
+ //\}
///\name Access to the abstract interface
- ///@{
+ //\{
optional_range nextPacketRange();
void finalizeThis();
factory_t factory();
factory_t nextPacketType();
- ///@}
+ //\}
protected:
// protected structors
// reference/memory management. Only to be called by intrusive_refcount_t.
void add_ref();
- bool release();
+ void release();
// containment management. Only to be called by PacketImpl.
template <class PacketType> friend class PacketInterpreter;
friend class detail::packet::test::TestDriver;
friend class PacketParserBase;
+
+ friend void senf::intrusive_ptr_add_ref(PacketInterpreterBase const *);
+ friend void senf::intrusive_ptr_release(PacketInterpreterBase const *);
};
+ void intrusive_ptr_add_ref(PacketInterpreterBase const * p);
+ void intrusive_ptr_release(PacketInterpreterBase const * p);
+
/** \brief Internal: Concrete packet interpreter
\internal
public pool_alloc_mixin< PacketInterpreter<PacketType> >
{
public:
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
// Types
typedef typename senf::detail::packet::smart_pointer<
typedef PacketType type;
typedef typename type::parser parser;
- ///////////////////////////////////////////////////////////////////////////
+ //-////////////////////////////////////////////////////////////////////////
///\name Structors and default members
- ///@{
+ //\{
// private constructors
// no copy
ptr clone();
- ///@}
- ///////////////////////////////////////////////////////////////////////////
+ //\}
+ //-////////////////////////////////////////////////////////////////////////
// Packet field access
}
-///////////////////////////////hh.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#endif
#if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_PacketInterpreter_i_)
#define HH_SENF_Packets_PacketInterpreter_i_