blob: f087536de947d65432af504bf1ceca8928684b14 [file] [log] [blame]
Mohammad Sabet532990d2016-10-17 20:23:56 +03301/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2011-2016 Regents of the University of California.
4 *
5 * This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and
6 * contributors.
7 *
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.
11 *
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.
15 *
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 **/
19
20#ifndef NDNSIM_HELPER_NDN_NETWORK_REGION_TABLE_HELPER_HPP
21#define NDNSIM_HELPER_NDN_NETWORK_REGION_TABLE_HELPER_HPP
22
23#include "ns3/node-container.h"
24
25#include "ns3/ndnSIM/model/ndn-common.hpp"
26
27namespace ns3 {
28namespace ndn {
29
30/**
31 * @ingroup ndn-helpers
32 * @brief Network Region Table Helper
33 *
34 * The NRT Helper interacts directly with Network Region Table by using set-like API
35 * in order to add/remove a prefix to/from the table or empty it in one node or
36 * a node container
37 */
38class NetworkRegionTableHelper
39{
40public:
41 static void
42 AddRegionName(Ptr<Node> node, const Name& regionName);
43
44 static void
45 AddRegionName(NodeContainer& c, const Name& regionName);
46
47 static void
48 AddRegionName(Ptr<Node> node, std::initializer_list<Name> regionNames);
49
50 static void
51 AddRegionName(const NodeContainer& c, std::initializer_list<Name> regionNames);
52
53 static void
54 RemoveRegionName(Ptr<Node> node, const Name& regionName);
55
56 static void
57 RemoveRegionName(const NodeContainer& c, const Name& regionName);
58
59 static void
60 RemoveRegionName(Ptr<Node> node, std::initializer_list<Name> regionNames);
61
62 static void
63 RemoveRegionName(const NodeContainer& c, std::initializer_list<Name> regionNames);
64
65 static void
66 EmptyNetworkRegionTable(Ptr<Node> node);
67
68 static void
69 EmptyNetworkRegionTable(const NodeContainer& c);
70};
71
72} // namespace ndn
73} // namespace ns3
74
75#endif // NDNSIM_HELPER_NDN_NETWORK_REGION_TABLE_HELPER_HPP