Loading...
Searching...
No Matches
common.hpp
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2014-2024, Regents of the University of California,
4 * Arizona Board of Regents,
5 * Colorado State University,
6 * University Pierre & Marie Curie, Sorbonne University,
7 * Washington University in St. Louis,
8 * Beijing Institute of Technology,
9 * The University of Memphis.
10 *
11 * This file is part of NFD (Named Data Networking Forwarding Daemon).
12 * See AUTHORS.md for complete list of NFD authors and contributors.
13 *
14 * NFD is free software: you can redistribute it and/or modify it under the terms
15 * of the GNU General Public License as published by the Free Software Foundation,
16 * either version 3 of the License, or (at your option) any later version.
17 *
18 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
19 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20 * PURPOSE. See the GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License along with
23 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26#ifndef NFD_CORE_COMMON_HPP
27#define NFD_CORE_COMMON_HPP
28
29#include "core/config.hpp"
30
31#ifdef NFD_WITH_TESTS
32#define NFD_VIRTUAL_WITH_TESTS virtual
33#define NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED public
34#define NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE public
35#define NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
36#define NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL override
37#define NFD_FINAL_UNLESS_WITH_TESTS
38#else
39#define NFD_VIRTUAL_WITH_TESTS
40#define NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
41#define NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE private
42#define NFD_PROTECTED_WITH_TESTS_ELSE_PRIVATE private
43#define NFD_OVERRIDE_WITH_TESTS_ELSE_FINAL final
44#define NFD_FINAL_UNLESS_WITH_TESTS final
45#endif
46
47#include <cstddef>
48#include <cstdint>
49#include <memory>
50#include <optional>
51#include <stdexcept>
52#include <string>
53#include <string_view>
54#include <utility>
55#include <vector>
56
57#include <ndn-cxx/data.hpp>
58#include <ndn-cxx/interest.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/exception.hpp>
64#include <ndn-cxx/util/signal.hpp>
65#include <ndn-cxx/util/span.hpp>
66#include <ndn-cxx/util/time.hpp>
67
68#include <boost/assert.hpp>
69#include <boost/core/noncopyable.hpp>
70
71namespace nfd {
72
73using std::size_t;
74
75using std::shared_ptr;
76using std::unique_ptr;
77using std::weak_ptr;
78using std::make_shared;
79using std::make_unique;
80
81using namespace std::string_literals;
82using namespace std::string_view_literals;
83
84using boost::noncopyable;
85
86using ndn::span;
87using ndn::Block;
88using ndn::Data;
89using ndn::Interest;
90using ndn::Name;
91using ndn::PartialName;
92
93// Not using a namespace alias (namespace tlv = ndn::tlv), because
94// it doesn't allow NFD to add other members to the namespace
95namespace tlv {
96using namespace ndn::tlv;
97} // namespace tlv
98
99namespace lp = ndn::lp;
100namespace name = ndn::name;
101namespace signal = ndn::signal;
102namespace time = ndn::time;
103
104using namespace ndn::block_literals;
105using namespace ndn::time_literals;
106
107} // namespace nfd
108
109#endif // NFD_CORE_COMMON_HPP
-status-http-server
Definition common.hpp:71