Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Packets / PacketInterpreter.ct
index 49a34e1..6d4a40f 100644 (file)
@@ -29,9 +29,9 @@
 #include "Packet.hh"
 
 #define prefix_
-///////////////////////////////ct.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::PacketInterpreterBase
 
 // Interpreter chain access
@@ -43,16 +43,16 @@ senf::PacketInterpreterBase::parseNextAs()
     optional_range r (nextPacketRange());
     if (!r)
         throw InvalidPacketChainException();
-    
+
     if (next())
         impl().truncateInterpreters(next().get());
 
-    typename PacketInterpreter<Type>::ptr pi 
+    typename PacketInterpreter<Type>::ptr pi
         (PacketInterpreter<Type>::create(&impl(),r->begin(),r->end(),Append));
     return pi;
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::PacketInterpreter<PacketType>
 
 // Create completely new packet
@@ -118,7 +118,7 @@ senf::PacketInterpreter<PacketType>::createAfter(PacketInterpreterBase::ptr pack
     optional_range r (packet->nextPacketRange());
     if (!r)
         throw InvalidPacketChainException();
-    
+
     if (packet->next())
         packet->impl().truncateInterpreters(packet->next().get());
 
@@ -147,11 +147,30 @@ senf::PacketInterpreter<PacketType>::createBefore(PacketInterpreterBase::ptr pac
 {
     if (packet->prev())
         packet->impl().truncateInterpretersBackwards(packet->prev().get());
-    
+
     return create(&packet->impl(),packet->data().begin(),packet->data().end(),Prepend);
 }
 
-////////////////////////////////////////
+template <class PacketType>
+prefix_ typename senf::PacketInterpreter<PacketType>::ptr
+senf::PacketInterpreter<PacketType>::createInsertBefore(PacketInterpreterBase::ptr packet)
+{
+    ptr pi (createInsertBefore(packet, senf::noinit));
+    pi->data().insert(pi->data().begin(),initHeadSize(),byte(0x00u));
+    pi->data().insert(pi->data().end(),initSize()-initHeadSize(),byte(0x00u));
+    pi->init();
+    return pi;
+}
+
+template <class PacketType>
+prefix_ typename senf::PacketInterpreter<PacketType>::ptr
+senf::PacketInterpreter<PacketType>::createInsertBefore(PacketInterpreterBase::ptr packet,
+                                                        senf::NoInit_t)
+{
+    return create(&packet->impl(),packet->data().begin(),packet->data().end(),packet);
+}
+
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // private members
 
 // virtual interface
@@ -214,7 +233,7 @@ senf::PacketInterpreter<PacketType>::v_nextPacketType()
 }
 
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::PacketInterpreterBase::Factory
 
 template <class ForwardReadableRange>
@@ -238,7 +257,7 @@ senf::PacketInterpreterBase::Factory::createAfter(PacketInterpreterBase::ptr pac
     return pi;
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::PacketInterpreter<PacketType>::FactoryImpl
 
 // Create completely new packet
@@ -332,6 +351,24 @@ createBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t)
     return senf::PacketInterpreter<PacketType>::createBefore(packet,senf::noinit);
 }
 
+template <class PacketType>
+prefix_ senf::PacketInterpreterBase::ptr
+senf::PacketInterpreter<PacketType>::FactoryImpl::
+createInsertBefore(PacketInterpreterBase::ptr packet)
+    const
+{
+    return senf::PacketInterpreter<PacketType>::createInsertBefore(packet);
+}
+
+template <class PacketType>
+prefix_ senf::PacketInterpreterBase::ptr
+senf::PacketInterpreter<PacketType>::FactoryImpl::
+createInsertBefore(PacketInterpreterBase::ptr packet, senf::NoInit_t)
+    const
+{
+    return senf::PacketInterpreter<PacketType>::createInsertBefore(packet,senf::noinit);
+}
+
 // Parse next packet in chain
 
 template <class PacketType>
@@ -342,7 +379,7 @@ senf::PacketInterpreter<PacketType>::FactoryImpl::parseNext(PacketInterpreterBas
     optional_range r (packet->nextPacketRange());
     if (!r)
         throw InvalidPacketChainException();
-    
+
     if (packet->next())
         packet->impl().truncateInterpreters(packet->next().get());
 
@@ -350,10 +387,10 @@ senf::PacketInterpreter<PacketType>::FactoryImpl::parseNext(PacketInterpreterBas
 }
 
 template <class PacketType>
-const typename senf::PacketInterpreter<PacketType>::FactoryImpl 
+const typename senf::PacketInterpreter<PacketType>::FactoryImpl
     senf::PacketInterpreter<PacketType>::factory_;
 
-///////////////////////////////ct.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 
 \f