#define HH_PacketInterpreter_ 1
// Custom includes
-#include <boost/intrusive/ilist.hpp>
+#include "../boost/intrusive/ilist.hpp"
#include <boost/optional.hpp>
#include <boost/range.hpp>
#include <boost/type_traits/aligned_storage.hpp>
#include <boost/type_traits/alignment_of.hpp>
-#include "Utils/intrusive_refcount.hh"
-#include "Utils/pool_alloc_mixin.hh"
+#include "../Utils/intrusive_refcount.hh"
+#include "../Utils/pool_alloc_mixin.hh"
#include "PacketData.hh"
-#include "typeidvalue.hh"
+#include "../Utils/TypeIdValue.hh"
//#include "PacketInterpreter.mpp"
///////////////////////////////hh.p////////////////////////////////////////
template <class PacketType> class PacketInterpreter;
- /** \brief
+ /** \brief Internal: Base packet interpreter class
+
+ \internal
+
+ 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.
*/
class PacketInterpreterBase
: protected PacketData,
enum Prepend_t { Prepend };
enum NoInit_t { noinit };
+ /** \brief Internal: Abstract packet factory
+
+ \internal
+
+ This abstract class provides an abstract packet factory interface. It allows to call
+ almost any one of the create / createAfter / createBefore static PacketInterpreter
+ without static information on the type of packet to create.
+ */
struct Factory {
virtual ~Factory();
ptr appendClone(detail::PacketImpl * impl, range r);
public:
- // Need this for g++ < 4.0. Since PacketInterpreter is not publically visible, it should not
+ // Need this for g++ < 4.0. Since PacketInterpreter is not publicly visible, it should not
// be a real problem to make impl() public here
using PacketData::impl;
friend class intrusive_refcount_t<PacketInterpreterBase>;
template <class PacketType> friend class PacketInterpreter;
friend class detail::packet::test::TestDriver;
+ friend class PacketParserBase;
};
- /** \brief Concrete packet interpreter
+ /** \brief Internal: Concrete packet interpreter
+
+ \internal
+
+ Instantiations of this class build the interpreter chain. This class is accessed by the
+ packet handles. It provides the packet-type specific functionality in addition to the
+ interface defined in the PacketInterpreterBase class.
\see PacketTypeBase for the \a PacketType interface
*/
// factory
+ /** \brief Internal: Implementation of abstract factory interface
+
+ \internal
+
+ Implements the abstract factory interface for \a PacketType
+ */
struct FactoryImpl : public Factory {
// Create completely new packet
friend class FactoryImpl;
};
+ /** \brief Invalid packet chain operation
+
+ 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"; } };
}
///////////////////////////////hh.e////////////////////////////////////////
+#endif
+#if !defined(HH_Packets__decls_) && !defined(HH_PacketInterpreter_i_)
+#define HH_PacketInterpreter_i_
#include "PacketInterpreter.cci"
#include "PacketInterpreter.ct"
#include "PacketInterpreter.cti"