blob: 4b39994c7cee1fcf036b6f6d11580676a1e249bd [file] [log] [blame]
Yingdi Yuce94f352015-04-11 19:17:01 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2014-2015, Regents of the University of California
4 *
5 * This file is part of ndn-group-encrypt (Group-based Encryption Protocol for NDN).
6 * See AUTHORS.md for complete list of ndn-group-encrypt authors and contributors.
7 *
8 * ndn-group-encrypt is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License as published by the Free Software
10 * Foundation, either version 3 of the License, or (at your option) any later version.
11 *
12 * ndn-group-encrypt is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * ndn-group-encrypt, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef NDN_GEP_COMMON_HPP
21#define NDN_GEP_COMMON_HPP
22
23#include "config.hpp"
24
Zhiyi Zhang84986cc2015-09-21 00:26:07 +080025#ifdef NDN_GEP_HAVE_TESTS
Yingdi Yuce94f352015-04-11 19:17:01 -070026#define VIRTUAL_WITH_TESTS virtual
27#define PUBLIC_WITH_TESTS_ELSE_PROTECTED public
28#define PUBLIC_WITH_TESTS_ELSE_PRIVATE public
29#define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected
30#else
31#define VIRTUAL_WITH_TESTS
32#define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected
33#define PUBLIC_WITH_TESTS_ELSE_PRIVATE private
34#define PROTECTED_WITH_TESTS_ELSE_PRIVATE private
35#endif
36
37/** \def DECL_OVERRIDE
38 * \brief expands to 'override' if compiler supports this feature, otherwise expands to nothing
39 */
40#ifdef HAVE_CXX_OVERRIDE
41#define DECL_OVERRIDE override
42#else
43#define DECL_OVERRIDE
44#endif
45
46#include <cstddef>
47#include <list>
48#include <map>
49#include <set>
50#include <queue>
51#include <unordered_map>
52#include <unordered_set>
53#include <vector>
54
55#include <ndn-cxx/common.hpp>
56#include <ndn-cxx/interest.hpp>
57#include <ndn-cxx/data.hpp>
58#include <ndn-cxx/util/signal.hpp>
59
60#include <boost/algorithm/string.hpp>
61#include <boost/asio.hpp>
62#include <boost/assert.hpp>
63#include <boost/lexical_cast.hpp>
64#include <boost/noncopyable.hpp>
65#include <boost/property_tree/ptree.hpp>
66
67namespace ndn {
68namespace gep {
69
70using std::size_t;
71
72using boost::noncopyable;
73
74using std::shared_ptr;
75using std::unique_ptr;
76using std::weak_ptr;
77using std::bad_weak_ptr;
78using std::make_shared;
79using std::enable_shared_from_this;
80
81using std::static_pointer_cast;
82using std::dynamic_pointer_cast;
83using std::const_pointer_cast;
84
85using std::function;
86using std::bind;
87using std::ref;
88using std::cref;
89
90using ndn::Interest;
91using ndn::Data;
92using ndn::Name;
93using ndn::Exclude;
94using ndn::Block;
95
96namespace tlv {
97using namespace ndn::tlv;
98} // namespace tlv
99
100namespace name = ndn::name;
101namespace time = ndn::time;
102namespace signal = ndn::util::signal;
103
104} // namespace gep
105} // namespace ndn
106
107#endif // NDN_GEP_COMMON_HPP