blob: cf236cadcd7b3e9ebd2626b6522378795e8f60ce [file] [log] [blame]
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Junxiao Shi5dd26c32014-07-20 23:15:14 -07003 * Copyright (c) 2014, 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
Alexander Afanasyev9bcbc7c2014-04-06 19:37:37 -070010 *
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/>.
Junxiao Shi5dd26c32014-07-20 23:15:14 -070024 */
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080025
26#ifndef NFD_COMMON_HPP
27#define NFD_COMMON_HPP
28
Junxiao Shi61c5ef32014-01-24 20:59:30 -070029#include "config.hpp"
30
Junxiao Shi88884492014-02-15 15:57:43 -070031#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
Junxiao Shi5dd26c32014-07-20 23:15:14 -070043#include <cstddef>
Alexander Afanasyev8552a382014-05-15 20:13:42 -070044#include <list>
45#include <set>
Junxiao Shi651b75e2014-07-17 20:15:09 -070046#include <queue>
Alexander Afanasyev8552a382014-05-15 20:13:42 -070047#include <vector>
48
Alexander Afanasyev4a771362014-04-24 21:29:33 -070049#include <ndn-cxx/common.hpp>
50#include <ndn-cxx/interest.hpp>
51#include <ndn-cxx/data.hpp>
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080052
Alexander Afanasyev8552a382014-05-15 20:13:42 -070053#include <boost/algorithm/string.hpp>
54#include <boost/asio.hpp>
Alexander Afanasyev920af2f2014-01-25 22:56:11 -080055#include <boost/assert.hpp>
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060056#include <boost/lexical_cast.hpp>
Davide Pesavento52a18f92014-04-10 00:55:01 +020057#include <boost/noncopyable.hpp>
Alexander Afanasyev8552a382014-05-15 20:13:42 -070058#include <boost/property_tree/ptree.hpp>
Davide Pesavento52a18f92014-04-10 00:55:01 +020059#include <boost/scoped_ptr.hpp>
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080060
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080061namespace nfd {
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080062
Junxiao Shi5dd26c32014-07-20 23:15:14 -070063using std::size_t;
64
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080065using boost::noncopyable;
Davide Pesavento52a18f92014-04-10 00:55:01 +020066using boost::scoped_ptr;
67
68using ndn::shared_ptr;
69using ndn::weak_ptr;
70using ndn::enable_shared_from_this;
71using ndn::make_shared;
72using ndn::static_pointer_cast;
73using ndn::dynamic_pointer_cast;
74using ndn::const_pointer_cast;
75using ndn::function;
76using ndn::bind;
Alexander Afanasyevf6980282014-05-13 18:28:40 -070077using ndn::ref;
78using ndn::cref;
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080079
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080080using ndn::Interest;
81using ndn::Data;
82using ndn::Name;
83using ndn::Exclude;
84using ndn::Block;
Davide Pesavento52a18f92014-04-10 00:55:01 +020085
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080086namespace tlv {
Junxiao Shi67f11ac2014-10-19 09:29:13 -070087// Don't write "namespace tlv = ndn::tlv", because NFD can add other members into this namespace.
88using namespace ndn::tlv;
89} // namespace tlv
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080090
Davide Pesavento52a18f92014-04-10 00:55:01 +020091namespace name = ndn::name;
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070092namespace time = ndn::time;
93
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080094} // namespace nfd
Alexander Afanasyevb927a3a2014-01-24 10:41:47 -080095
96#endif // NFD_COMMON_HPP