X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketInterpreter.hh;h=ac38e7d803a5c32b2d252db3f109598721d78ad7;hb=c45c112ae88196ea8da9c5a9efb0e167196744d2;hp=9a1a3fa6d239c1822dd8c68b5291c9d94d5077cb;hpb=66293acca094b2f29e26e70208691db4af274efb;p=senf.git diff --git a/Packets/PacketInterpreter.hh b/Packets/PacketInterpreter.hh index 9a1a3fa..ac38e7d 100644 --- a/Packets/PacketInterpreter.hh +++ b/Packets/PacketInterpreter.hh @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -23,15 +23,13 @@ /** \file \brief PacketInterpreter public header */ -#ifndef HH_PacketInterpreter_ -#define HH_PacketInterpreter_ 1 +#ifndef HH_SENF_Packets_PacketInterpreter_ +#define HH_SENF_Packets_PacketInterpreter_ 1 // Custom includes #include "../boost/intrusive/ilist.hpp" #include #include -#include -#include #include "../Utils/intrusive_refcount.hh" #include "../Utils/pool_alloc_mixin.hh" #include "../Utils/Tags.hh" @@ -162,11 +160,20 @@ namespace senf { ///@} + ///\name Annotations + ///@{ + + template + Annotation & annotation(); + + ///@} + ///\name Access to the abstract interface ///@{ optional_range nextPacketRange(); - void finalize(); + void finalizeThis(); + void finalizeTo(ptr other); void dump(std::ostream & os); TypeIdValue typeId(); factory_t factory(); @@ -211,7 +218,7 @@ namespace senf { void releaseImpl(); friend class detail::PacketImpl; - friend class intrusive_refcount_t; + friend class intrusive_refcount_base; template friend class PacketInterpreter; friend class detail::packet::test::TestDriver; friend class PacketParserBase; @@ -249,8 +256,6 @@ namespace senf { // no copy // no conversion constructors - ~PacketInterpreter(); - static factory_t factory(); // Create completely new packet @@ -287,7 +292,6 @@ namespace senf { // Packet field access parser fields(); - parser * fields_p(); // PacketType access @@ -364,11 +368,6 @@ namespace senf { static const FactoryImpl factory_; - parser * parser_p(); - - boost::aligned_storage< sizeof(parser), - boost::alignment_of::value > parserStorage_; - friend class detail::packet::test::TestDriver; friend class PacketInterpreterBase; friend class FactoryImpl; @@ -379,15 +378,15 @@ namespace senf { This exception signals an invalid operation on the chain like trying to find a non-existent chain member and other similar error conditions. */ - struct InvalidPacketChainException : public std::exception - { virtual char const * what() const throw() { return "invalid packet chain"; } }; + struct InvalidPacketChainException : public senf::Exception + { InvalidPacketChainException() : senf::Exception("invalid packet chain"){} }; } ///////////////////////////////hh.e//////////////////////////////////////// #endif -#if !defined(HH_Packets__decls_) && !defined(HH_PacketInterpreter_i_) -#define HH_PacketInterpreter_i_ +#if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_PacketInterpreter_i_) +#define HH_SENF_Packets_PacketInterpreter_i_ #include "PacketInterpreter.cci" #include "PacketInterpreter.ct" #include "PacketInterpreter.cti"