common.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_CORE_COMMON_HPP
27 #define NFD_CORE_COMMON_HPP
28 
29 #include "core/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 
43 #include <cstddef>
44 #include <cstdint>
45 #include <functional>
46 #include <limits>
47 #include <list>
48 #include <map>
49 #include <memory>
50 #include <set>
51 #include <string>
52 #include <unordered_map>
53 #include <unordered_set>
54 #include <utility>
55 #include <vector>
56 
57 #include <ndn-cxx/interest.hpp>
58 #include <ndn-cxx/data.hpp>
59 #include <ndn-cxx/name.hpp>
60 #include <ndn-cxx/encoding/block.hpp>
61 #include <ndn-cxx/lp/nack.hpp>
62 #include <ndn-cxx/util/backports.hpp>
63 #include <ndn-cxx/util/face-uri.hpp>
64 #include <ndn-cxx/util/signal.hpp>
65 
66 #include <boost/algorithm/string.hpp>
67 #include <boost/asio.hpp>
68 #include <boost/assert.hpp>
69 #include <boost/lexical_cast.hpp>
70 #include <boost/noncopyable.hpp>
71 #include <boost/property_tree/ptree.hpp>
72 #include <boost/throw_exception.hpp>
73 
74 namespace nfd {
75 
76 using std::size_t;
77 
78 using boost::noncopyable;
79 
80 using std::shared_ptr;
81 using std::unique_ptr;
82 using std::weak_ptr;
83 using std::make_shared;
84 using ndn::make_unique;
85 using std::enable_shared_from_this;
86 
87 using std::static_pointer_cast;
88 using std::dynamic_pointer_cast;
89 using std::const_pointer_cast;
90 
91 using std::function;
92 using std::bind;
93 using std::ref;
94 using std::cref;
95 
96 using ndn::to_string;
97 
98 using ndn::Interest;
99 using ndn::Data;
100 using ndn::Name;
101 using ndn::PartialName;
102 using ndn::Exclude;
103 using ndn::Link;
104 using ndn::Block;
105 using ndn::util::FaceUri;
106 
107 namespace tlv {
108 // Don't write "namespace tlv = ndn::tlv", because NFD can add other members into this namespace.
109 using namespace ndn::tlv;
110 } // namespace tlv
111 
112 namespace lp = ndn::lp;
113 namespace name = ndn::name;
114 namespace time = ndn::time;
115 namespace signal = ndn::util::signal;
116 
117 } // namespace nfd
118 
119 #endif // NFD_CORE_COMMON_HPP
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32