X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FPacketImpl.hh;h=871b9ec5948f9b377595a8e54be21b78a523f215;hb=96bb4084fc4493a7a2686d02a895bce1160d61d6;hp=516d272d22260ca0a2b364a06749bcad38521637;hpb=2d6585ff852e9d282c17003ba1db0b73eb3a8500;p=senf.git diff --git a/Packets/PacketImpl.hh b/Packets/PacketImpl.hh index 516d272..871b9ec 100644 --- a/Packets/PacketImpl.hh +++ b/Packets/PacketImpl.hh @@ -1,6 +1,8 @@ -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// $Id$ +// +// 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 @@ -27,7 +29,7 @@ // Custom includes #include #include -#include "Utils/pool_alloc_mixin.hh" +#include "../Utils/pool_alloc_mixin.hh" #include "PacketTypes.hh" //#include "PacketImpl.mpp" @@ -35,8 +37,17 @@ namespace senf { namespace detail { - - class PacketImpl + + /** \brief Internal: Packet data storage + + \internal + + 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. + */ + class PacketImpl : boost::noncopyable, public pool_alloc_mixin { @@ -59,7 +70,7 @@ namespace detail { ~PacketImpl(); // rerference/memory management - + void add_ref(refcount_t n=1); void release(refcount_t n=1); refcount_t refcount() const; @@ -92,9 +103,14 @@ namespace detail { void erase(PacketData * self, iterator first, iterator last); void clear(PacketData * self); - // The Guard will keep the PacketImpl instance alive during a members execution time - // It the refcount should drop to 0, PacketImpl will be deleted after the member - // has completed executing. + /** \brief Internal: Keep PacketImpl instance alive + + \internal + + The Guard will keep the PacketImpl instance alive during a members execution time + It the refcount should drop to 0, PacketImpl will be deleted after the member + has completed executing. + */ struct Guard { Guard(PacketImpl * impl); ~Guard(); @@ -107,15 +123,14 @@ namespace detail { interpreter_list interpreters_; void eraseInterpreters(interpreter_list::iterator b, interpreter_list::iterator e); - void updateIterators(PacketData * self, iterator pos, difference_type n); - + void updateIterators(PacketData * self, difference_type pos, difference_type n); }; }} ///////////////////////////////hh.e//////////////////////////////////////// #endif -#if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_PacketImpl_i_) +#if !defined(HH_Packets__decls_) && !defined(HH_PacketImpl_i_) #define HH_PacketImpl_i_ #include "PacketImpl.cci" //#include "PacketImpl.ct" @@ -132,3 +147,4 @@ namespace detail { // compile-command: "scons -u test" // comment-column: 40 // End: +