#include <senf/config.hh>
#include <senf/Utils/IgnoreValue.hh>
-///////////////////////////////ih.p////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
namespace senf {
struct ComplexAnnotation;
- void dumpPacketAnnotationRegistry(std::ostream & os);
namespace detail {
virtual ~EntryBase() {}
virtual void * get() = 0;
+
+ typedef EntryBase * ptr;
+ virtual ptr clone() const = 0;
};
+ inline AnnotationRegistry::EntryBase::ptr new_clone( AnnotationRegistry::EntryBase const & entry)
+ {
+ return entry.clone();
+ }
+
template <class Annotation>
class AnnotationRegistry::Entry
: public AnnotationRegistry::EntryBase
{ senf::IGNORE(&proxy_); return key_; }
virtual void * get() { return & annotation_; }
+ virtual EntryBase::ptr clone() const { return new Entry<Annotation>( *this); }
private:
Annotation annotation_;
}}
-///////////////////////////////ih.e////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#endif
\f