Yingdi Yu | b20ae81 | 2014-08-15 11:20:19 -0700 | [diff] [blame] | 1 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2012-2014 University of California, Los Angeles |
| 4 | * |
| 5 | * This file is part of ChronoSync, synchronization library for distributed realtime |
| 6 | * applications for NDN. |
| 7 | * |
| 8 | * ChronoSync 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, either |
| 10 | * version 3 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * ChronoSync 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 | * ChronoSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html> |
| 20 | * @author Yingdi Yu <yingdi@cs.ucla.edu> |
| 21 | */ |
| 22 | |
| 23 | #ifndef CHRONOSYNC_COMMON_HPP |
| 24 | #define CHRONOSYNC_COMMON_HPP |
| 25 | |
| 26 | #include "config.hpp" |
| 27 | |
| 28 | #ifdef _TESTS |
| 29 | #define VIRTUAL_WITH_TESTS virtual |
| 30 | #define PUBLIC_WITH_TESTS_ELSE_PROTECTED public |
| 31 | #define PUBLIC_WITH_TESTS_ELSE_PRIVATE public |
| 32 | #define PROTECTED_WITH_TESTS_ELSE_PRIVATE protected |
| 33 | #else |
| 34 | #define VIRTUAL_WITH_TESTS |
| 35 | #define PUBLIC_WITH_TESTS_ELSE_PROTECTED protected |
| 36 | #define PUBLIC_WITH_TESTS_ELSE_PRIVATE private |
| 37 | #define PROTECTED_WITH_TESTS_ELSE_PRIVATE private |
| 38 | #endif |
| 39 | |
| 40 | #include <cstddef> |
| 41 | #include <list> |
| 42 | #include <set> |
| 43 | #include <queue> |
| 44 | #include <vector> |
| 45 | |
| 46 | #include <ndn-cxx/common.hpp> |
| 47 | #include <ndn-cxx/interest.hpp> |
| 48 | #include <ndn-cxx/data.hpp> |
| 49 | |
| 50 | #include <boost/algorithm/string.hpp> |
| 51 | #include <boost/asio.hpp> |
| 52 | #include <boost/assert.hpp> |
Yingdi Yu | d514c17 | 2014-08-26 21:49:39 -0700 | [diff] [blame] | 53 | #include <boost/foreach.hpp> |
Yingdi Yu | b20ae81 | 2014-08-15 11:20:19 -0700 | [diff] [blame] | 54 | #include <boost/lexical_cast.hpp> |
| 55 | #include <boost/noncopyable.hpp> |
| 56 | #include <boost/property_tree/ptree.hpp> |
| 57 | #include <boost/scoped_ptr.hpp> |
Yingdi Yu | d514c17 | 2014-08-26 21:49:39 -0700 | [diff] [blame] | 58 | #include <boost/tuple/tuple.hpp> |
Yingdi Yu | b20ae81 | 2014-08-15 11:20:19 -0700 | [diff] [blame] | 59 | |
| 60 | namespace chronosync { |
| 61 | |
| 62 | using std::size_t; |
| 63 | |
| 64 | using boost::noncopyable; |
| 65 | using boost::scoped_ptr; |
| 66 | |
| 67 | using ndn::shared_ptr; |
| 68 | using ndn::weak_ptr; |
| 69 | using ndn::enable_shared_from_this; |
| 70 | using ndn::make_shared; |
| 71 | using ndn::static_pointer_cast; |
| 72 | using ndn::dynamic_pointer_cast; |
| 73 | using ndn::const_pointer_cast; |
| 74 | using ndn::function; |
| 75 | using ndn::bind; |
| 76 | using ndn::ref; |
| 77 | using ndn::cref; |
| 78 | |
| 79 | using ndn::Interest; |
| 80 | using ndn::Data; |
| 81 | using ndn::Name; |
| 82 | using ndn::Exclude; |
| 83 | using ndn::Block; |
| 84 | |
| 85 | namespace tlv { |
| 86 | using namespace ndn::Tlv; |
| 87 | } |
| 88 | |
| 89 | namespace name = ndn::name; |
| 90 | namespace time = ndn::time; |
| 91 | |
| 92 | } // namespace chronosync |
| 93 | |
| 94 | #endif // CHRONOSYNC_COMMON_HPP |