PacketInfo.cci
Go to the documentation of this file.
1 //
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
6 //
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
11 //
12 
13 
14 /** \file
15  \brief PacketInfo inline non-template implementation */
16 
17 //#include "PacketInfo.ih"
18 
19 // Custom includes
20 
21 #define prefix_ inline
22 ///////////////////////////////cci.p///////////////////////////////////////
23 
24 prefix_ senf::PacketInfo::PacketInfo()
25  : impl_()
26 {}
27 
28 prefix_ senf::PacketInfo::PacketInfo(Packet const & packet)
29  : impl_(& packet.data().impl())
30 {}
31 
32 prefix_ bool senf::PacketInfo::boolean_test()
33  const
34 {
35  return static_cast<bool>(impl_);
36 }
37 
38 template <class Annotation>
39 prefix_ Annotation & senf::PacketInfo::annotation()
40 {
41  return impl_->annotation<Annotation>();
42 }
43 
44 prefix_ void senf::PacketInfo::clearAnnotations()
45 {
46  impl_->clearAnnotations();
47 }
48 
49 prefix_ void senf::PacketInfo::dumpAnnotations(std::ostream & os)
50 {
51  impl_->dumpAnnotations(os);
52 }
53 
54 prefix_ bool senf::PacketInfo::is_shared()
55  const
56 {
57  return impl_->refcount() > 1;
58 }
59 
60 prefix_ bool senf::PacketInfo::usingExternalMemory()
61  const
62 {
63  return impl_->usingExternalMemory();
64 }
65 
66 prefix_ void senf::PacketInfo::releaseExternalMemory()
67  const
68 {
69  impl_->releaseExternalMemory();
70 }
71 
72 prefix_ void senf::PacketInfo::memDebug(std::ostream & os)
73  const
74 {
75  impl_->memDebug(os);
76 }
77 
78 ///////////////////////////////cci.e///////////////////////////////////////
79 #undef prefix_
80 
81 
82 // Local Variables:
83 // mode: c++
84 // fill-column: 100
85 // comment-column: 40
86 // c-file-style: "senf"
87 // indent-tabs-mode: nil
88 // ispell-local-dictionary: "american"
89 // compile-command: "scons -u test"
90 // End: