Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Packets / PacketInterpreter.cc
index 62b912c..d0cff20 100644 (file)
@@ -30,9 +30,9 @@
 
 //#include "PacketInterpreter.mpp"
 #define prefix_
-///////////////////////////////cc.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::PacketInterpreterBase
 
 // structors and default members
@@ -46,6 +46,7 @@ prefix_ senf::PacketInterpreterBase::ptr senf::PacketInterpreterBase::clone()
     ptr pi (appendClone(p.p,begin(),p.p->begin()));
     for (ptr i (next()); i; i = i->next())
         i->appendClone(p.p,begin(),p.p->begin());
+    pi->impl().assignAnnotations( impl());
     return pi;
 }
 
@@ -70,6 +71,12 @@ prefix_ senf::PacketInterpreterBase::ptr senf::PacketInterpreterBase::append(ptr
     return rv;
 }
 
+prefix_ void senf::PacketInterpreterBase::reparse()
+{
+    if (next())
+        impl().truncateInterpreters(next().get());
+}
+
 // Access to the abstract interface
 
 prefix_ void senf::PacketInterpreterBase::dump(std::ostream & os)
@@ -101,13 +108,31 @@ prefix_ void senf::PacketInterpreterBase::finalizeTo(ptr other)
     finalizeThis();
 }
 
-///////////////////////////////////////////////////////////////////////////
+// reference/memory management
+
+prefix_ void senf::PacketInterpreterBase::add_ref()
+{
+    if (impl_ && !refcount())
+        impl_->add_ref();
+    intrusive_refcount_t<PacketInterpreterBase>::add_ref();
+}
+
+prefix_ void senf::PacketInterpreterBase::release()
+{
+    if (impl_ && refcount()==1)
+        // This call will set impl_ to 0 if we just removed the last reference ...
+        impl_->release();
+    if (intrusive_refcount_t<PacketInterpreterBase>::release() && !impl_)
+        delete this;
+}
+
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::PacketInterpreterBase::Factory
 
 prefix_  senf::PacketInterpreterBase::Factory::~Factory()
 {}
 
-///////////////////////////////cc.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 //#include "PacketInterpreter.mpp"