NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
common.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_COMMON_HPP
27 #define NFD_COMMON_HPP
28 
29 #include "config.hpp"
30 
31 #ifdef WITH_TESTS
32 #define VIRTUAL_WITH_TESTS virtual
33 #define PUBLIC_WITH_TESTS_ELSE_PROTECTED public
34 #define PUBLIC_WITH_TESTS_ELSE_PRIVATE public
35 #define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
36 #else
37 #define VIRTUAL_WITH_TESTS
38 #define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
39 #define PUBLIC_WITH_TESTS_ELSE_PRIVATE private
40 #define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
41 #endif
42 
47 #ifdef HAVE_CXX_OVERRIDE
48 #define DECL_OVERRIDE override
49 #else
50 #define DECL_OVERRIDE
51 #endif
52 
57 #ifdef HAVE_CXX_FINAL
58 #define DECL_FINAL final
59 #else
60 #define DECL_FINAL
61 #endif
62 
67 #ifdef HAVE_CXX_CLASS_FINAL
68 #define DECL_CLASS_FINAL final
69 #else
70 #define DECL_CLASS_FINAL
71 #endif
72 
73 #include <cstddef>
74 #include <cstdint>
75 #include <functional>
76 #include <limits>
77 #include <list>
78 #include <map>
79 #include <memory>
80 #include <set>
81 #include <string>
82 #include <unordered_map>
83 #include <unordered_set>
84 #include <utility>
85 #include <vector>
86 
87 #include <ndn-cxx/interest.hpp>
88 #include <ndn-cxx/data.hpp>
89 #include <ndn-cxx/name.hpp>
90 #include <ndn-cxx/encoding/block.hpp>
91 #include <ndn-cxx/lp/nack.hpp>
92 #include <ndn-cxx/util/backports.hpp>
93 #include <ndn-cxx/util/face-uri.hpp>
94 #include <ndn-cxx/util/signal.hpp>
95 
96 #include <boost/algorithm/string.hpp>
97 #include <boost/asio.hpp>
98 #include <boost/assert.hpp>
99 #include <boost/lexical_cast.hpp>
100 #include <boost/noncopyable.hpp>
101 #include <boost/property_tree/ptree.hpp>
102 #include <boost/throw_exception.hpp>
103 
104 namespace nfd {
105 
106 using std::size_t;
107 
108 using boost::noncopyable;
109 
110 using std::shared_ptr;
111 using std::unique_ptr;
112 using std::weak_ptr;
113 using std::make_shared;
114 using ndn::make_unique;
115 using std::enable_shared_from_this;
116 
117 using std::static_pointer_cast;
118 using std::dynamic_pointer_cast;
119 using std::const_pointer_cast;
120 
121 using std::function;
122 using std::bind;
123 using std::ref;
124 using std::cref;
125 
126 using ndn::to_string;
127 
128 using ndn::Interest;
129 using ndn::Data;
130 using ndn::Name;
131 using ndn::PartialName;
132 using ndn::Exclude;
133 using ndn::Link;
134 using ndn::Block;
135 using ndn::util::FaceUri;
136 
137 namespace tlv {
138 // Don't write "namespace tlv = ndn::tlv", because NFD can add other members into this namespace.
139 using namespace ndn::tlv;
140 } // namespace tlv
141 
142 namespace lp = ndn::lp;
143 namespace name = ndn::name;
144 namespace time = ndn::time;
145 namespace signal = ndn::util::signal;
146 
147 } // namespace nfd
148 
149 #endif // NFD_COMMON_HPP
represents the underlying protocol and address used by a Face
Definition: face-uri.hpp:44
Class representing a wire element of NDN-TLV packet format.
Definition: block.hpp:43
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
Namespace defining NDN-TLV related constants and procedures.
Definition: tlv-nfd.hpp:29
Name PartialName
Partial name abstraction to represent an arbitrary sequence of name components.
Definition: name.hpp:36
std::string to_string(const V &v)
Definition: backports.hpp:55
unique_ptr< T > make_unique(Args &&... args)
Definition: backports.hpp:44