Alexander Afanasyev | 60a7b62 | 2014-12-20 17:04:07 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (c) 2011-2015 Regents of the University of California. |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 4 | * |
Alexander Afanasyev | 60a7b62 | 2014-12-20 17:04:07 -0800 | [diff] [blame] | 5 | * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and |
| 6 | * contributors. |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 7 | * |
Alexander Afanasyev | 60a7b62 | 2014-12-20 17:04:07 -0800 | [diff] [blame] | 8 | * ndnSIM 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. |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 11 | * |
Alexander Afanasyev | 60a7b62 | 2014-12-20 17:04:07 -0800 | [diff] [blame] | 12 | * ndnSIM 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. |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 15 | * |
Alexander Afanasyev | 60a7b62 | 2014-12-20 17:04:07 -0800 | [diff] [blame] | 16 | * You should have received a copy of the GNU General Public License along with |
| 17 | * ndnSIM, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | **/ |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 19 | |
| 20 | #ifndef EMPTY_POLICY_H_ |
| 21 | #define EMPTY_POLICY_H_ |
| 22 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 23 | /// @cond include_hidden |
| 24 | |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 25 | namespace ns3 { |
| 26 | namespace ndn { |
| 27 | namespace ndnSIM { |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 28 | |
Alexander Afanasyev | 30f60e3 | 2012-07-10 14:21:16 -0700 | [diff] [blame] | 29 | /** |
| 30 | * @brief Traits for empty (bogus) replacement policy |
| 31 | */ |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame] | 32 | struct empty_policy_traits { |
Alexander Afanasyev | 991a0cc | 2012-12-10 11:38:19 -0800 | [diff] [blame] | 33 | /// @brief Name that can be used to identify the policy (for NS-3 object model and logging) |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame] | 34 | static std::string |
| 35 | GetName() |
| 36 | { |
| 37 | return ""; |
| 38 | } |
Alexander Afanasyev | 991a0cc | 2012-12-10 11:38:19 -0800 | [diff] [blame] | 39 | |
Alexander Afanasyev | 78057c3 | 2012-07-06 15:18:46 -0700 | [diff] [blame] | 40 | typedef void* policy_hook_type; |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 41 | |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame] | 42 | template<class Container> |
| 43 | struct container_hook { |
| 44 | typedef void* type; |
| 45 | }; |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 46 | |
Alexander Afanasyev | be55cf6 | 2014-12-20 17:51:09 -0800 | [diff] [blame] | 47 | template<class Base, class Container, class Hook> |
| 48 | struct policy { |
| 49 | struct type { |
| 50 | inline type(Base& base) |
| 51 | { |
| 52 | } |
| 53 | |
| 54 | inline void update(typename Container::iterator) |
| 55 | { |
| 56 | } |
| 57 | inline bool insert(typename Container::iterator) |
| 58 | { |
| 59 | return true; |
| 60 | } |
| 61 | inline void |
| 62 | lookup(typename Container::iterator item) |
| 63 | { |
| 64 | } |
| 65 | inline void |
| 66 | erase(typename Container::iterator item) |
| 67 | { |
| 68 | } |
| 69 | inline void |
| 70 | clear() |
| 71 | { |
| 72 | } |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 73 | }; |
| 74 | }; |
| 75 | }; |
| 76 | |
Alexander Afanasyev | e77db79 | 2012-08-09 11:10:58 -0700 | [diff] [blame] | 77 | } // ndnSIM |
Alexander Afanasyev | 2b4c947 | 2012-08-09 15:00:38 -0700 | [diff] [blame] | 78 | } // ndn |
Alexander Afanasyev | e77db79 | 2012-08-09 11:10:58 -0700 | [diff] [blame] | 79 | } // ns3 |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 80 | |
Spyridon Mastorakis | 460f57c | 2014-12-17 00:44:14 -0800 | [diff] [blame] | 81 | /// @endcond |
| 82 | |
Alexander Afanasyev | 71ed238 | 2012-07-06 11:37:41 -0700 | [diff] [blame] | 83 | #endif // EMPTY_POLICY_H_ |