X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FPackets%2FPacketImpl.ih;h=619859fecc17c278621e272da42eefdbc484a06c;hb=7ee689fe38d66aa3a0004d55e8708750d35adc0b;hp=e6b7bfecb0bd86b7a03a332bdb3679e0bf2a4888;hpb=7c691ffe57bd1939572a94736bedf6ac3a3f7b1a;p=senf.git diff --git a/senf/Packets/PacketImpl.ih b/senf/Packets/PacketImpl.ih index e6b7bfe..619859f 100644 --- a/senf/Packets/PacketImpl.ih +++ b/senf/Packets/PacketImpl.ih @@ -43,7 +43,7 @@ #include #include -///////////////////////////////ih.p//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// namespace senf { @@ -154,8 +154,16 @@ 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 AnnotationRegistry::Entry : public AnnotationRegistry::EntryBase @@ -168,6 +176,7 @@ namespace detail { { senf::IGNORE(&proxy_); return key_; } virtual void * get() { return & annotation_; } + virtual EntryBase::ptr clone() const { return new Entry( *this); } private: Annotation annotation_; @@ -177,7 +186,7 @@ namespace detail { }} -///////////////////////////////ih.e//////////////////////////////////////// +//-///////////////////////////////////////////////////////////////////////////////////////////////// #endif