2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
15 \brief PacketImpl non-inline template implementation */
17 #include "PacketImpl.ih"
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
24 template <class Annotation>
25 senf::detail::AnnotationRegistry::RegistrationProxy<Annotation>
26 senf::detail::AnnotationRegistry::Entry<Annotation>::proxy_;
28 template <class Annotation>
29 senf::detail::AnnotationRegistry::key_type
30 senf::detail::AnnotationRegistry::Entry<Annotation>::key_;
32 #ifndef SENF_PACKET_NO_COMPLEX_ANNOTATIONS
34 template <class Annotation>
35 prefix_ void * senf::detail::PacketImpl::complexAnnotation()
37 AnnotationRegistry::key_type key (AnnotationRegistry::lookup<Annotation>());
38 void * rv (complexAnnotation(key));
40 while (complexAnnotations_.size() < ComplexAnnotations::size_type(-key))
41 complexAnnotations_.push_back(0);
42 complexAnnotations_.replace(-key-1, new AnnotationRegistry::Entry<Annotation>());
43 rv = complexAnnotations_[-key-1].get();
50 //-/////////////////////////////////////////////////////////////////////////////////////////////////
58 // c-file-style: "senf"
59 // indent-tabs-mode: nil
60 // ispell-local-dictionary: "american"
61 // compile-command: "scons -u test"