Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (c) 2014, Regents of the University of California |
| 4 | * |
| 5 | * This file is part of NSL (NDN Signature Logger). |
| 6 | * See AUTHORS.md for complete list of NSL authors and contributors. |
| 7 | * |
| 8 | * NSL is free software: you can redistribute it and/or modify it under the terms |
| 9 | * of the GNU General Public License as published by the Free Software Foundation, |
| 10 | * either version 3 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * NSL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 13 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 | * 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 | * NSL, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | * \author Yingdi Yu <yingdi@cs.ucla.edu> |
| 20 | */ |
| 21 | |
| 22 | #ifndef NSL_COMMON_HPP |
| 23 | #define NSL_COMMON_HPP |
| 24 | |
| 25 | #include "config.hpp" |
| 26 | |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 27 | #ifdef NSL_HAVE_TESTS |
| 28 | #define NSL_VIRTUAL_WITH_TESTS virtual |
| 29 | #define NSL_PUBLIC_WITH_TESTS_ELSE_PROTECTED public |
| 30 | #define NSL_PUBLIC_WITH_TESTS_ELSE_PRIVATE public |
| 31 | #define NSL_PROTECTED_WITH_TESTS_ELSE_PRIVATE protected |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 32 | #else |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 33 | #define NSL_VIRTUAL_WITH_TESTS |
| 34 | #define NSL_PUBLIC_WITH_TESTS_ELSE_PROTECTED protected |
| 35 | #define NSL_PUBLIC_WITH_TESTS_ELSE_PRIVATE private |
| 36 | #define NSL_PROTECTED_WITH_TESTS_ELSE_PRIVATE private |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 37 | #endif |
| 38 | |
| 39 | #include <cstddef> |
| 40 | #include <list> |
| 41 | #include <set> |
| 42 | #include <queue> |
| 43 | #include <vector> |
| 44 | |
| 45 | #include <ndn-cxx/common.hpp> |
| 46 | #include <ndn-cxx/interest.hpp> |
| 47 | #include <ndn-cxx/data.hpp> |
| 48 | |
| 49 | #include <boost/algorithm/string.hpp> |
| 50 | #include <boost/asio.hpp> |
| 51 | #include <boost/assert.hpp> |
| 52 | #include <boost/lexical_cast.hpp> |
| 53 | #include <boost/noncopyable.hpp> |
| 54 | #include <boost/property_tree/ptree.hpp> |
| 55 | #include <boost/scoped_ptr.hpp> |
| 56 | |
| 57 | namespace nsl { |
| 58 | |
| 59 | using std::size_t; |
| 60 | |
| 61 | using boost::noncopyable; |
| 62 | using boost::scoped_ptr; |
| 63 | |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 64 | using std::shared_ptr; |
| 65 | using std::weak_ptr; |
| 66 | using std::enable_shared_from_this; |
| 67 | using std::make_shared; |
| 68 | using std::static_pointer_cast; |
| 69 | using std::dynamic_pointer_cast; |
| 70 | using std::const_pointer_cast; |
| 71 | using std::function; |
| 72 | using std::bind; |
| 73 | using std::ref; |
| 74 | using std::cref; |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 75 | |
| 76 | using ndn::Interest; |
| 77 | using ndn::Data; |
| 78 | using ndn::Name; |
| 79 | using ndn::Exclude; |
| 80 | using ndn::Block; |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 81 | using ndn::Signature; |
| 82 | using ndn::KeyLocator; |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 83 | |
| 84 | namespace tlv { |
Yingdi Yu | 0c3e591 | 2015-03-17 14:22:38 -0700 | [diff] [blame] | 85 | using namespace ndn::tlv; |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 86 | } |
| 87 | |
| 88 | namespace name = ndn::name; |
| 89 | namespace time = ndn::time; |
| 90 | |
| 91 | } // namespace nsl |
| 92 | |
| 93 | #endif // NSL_COMMON_HPP |