NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
content-store-with-freshness.cc
1
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2011 University of California, Los Angeles
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19
*/
20
21
#include "content-store-with-freshness.h"
22
23
#include "../../utils/trie/random-policy.h"
24
#include "../../utils/trie/lru-policy.h"
25
#include "../../utils/trie/fifo-policy.h"
26
#include "../../utils/trie/lfu-policy.h"
27
28
#define NS_OBJECT_ENSURE_REGISTERED_TEMPL(type, templ) \
29
static struct X ## type ## templ ## RegistrationClass \
30
{ \
31
X ## type ## templ ## RegistrationClass () { \
32
ns3::TypeId tid = type<templ>::GetTypeId (); \
33
tid.GetParent (); \
34
} \
35
} x_ ## type ## templ ## RegistrationVariable
36
37
namespace
ns3 {
38
namespace
ndn {
39
40
using namespace
ndnSIM;
41
42
namespace
cs {
43
44
// explicit instantiation and registering
48
template
class
ContentStoreWithFreshness<lru_policy_traits>;
49
53
template
class
ContentStoreWithFreshness<random_policy_traits>;
54
58
template
class
ContentStoreWithFreshness<fifo_policy_traits>;
59
63
template
class
ContentStoreWithFreshness<lfu_policy_traits>;
64
65
66
NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, lru_policy_traits);
67
NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, random_policy_traits);
68
NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, fifo_policy_traits);
69
70
NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, lfu_policy_traits);
71
72
#ifdef DOXYGEN
73
// /**
74
// * \brief Content Store with freshness implementing LRU cache replacement policy
75
// */
76
class
Freshness::Lru
:
public
ContentStoreWithFreshness<lru_policy_traits>
{ };
77
81
class
Freshness::Fifo
:
public
ContentStoreWithFreshness<fifo_policy_traits>
{ };
82
86
class
Freshness::Random
:
public
ContentStoreWithFreshness<random_policy_traits>
{ };
87
91
class
Freshness::Lfu
:
public
ContentStoreWithFreshness<lfu_policy_traits>
{ };
92
93
#endif
94
95
96
}
// namespace cs
97
}
// namespace ndn
98
}
// namespace ns3
ns3::ndn::cs::Freshness::Lfu
Content Store with freshness implementing Least Frequently Used cache replacement policy...
Definition:
content-store-with-freshness.cc:91
ns3::ndn::cs::ContentStoreWithFreshness< lru_policy_traits >
ns3::ndn::cs::Freshness::Random
Content Store with freshness implementing Random cache replacement policy.
Definition:
content-store-with-freshness.cc:86
ns3::ndn::cs::Freshness::Lru
Content Store with freshness implementing LRU cache replacement policy.
Definition:
content-store-with-freshness.cc:76
ns3::ndn::cs::Freshness::Fifo
Content Store with freshness implementing FIFO cache replacement policy.
Definition:
content-store-with-freshness.cc:81
ndnSIM
model
cs
content-store-with-freshness.cc
Generated on Mon Jan 19 2015 11:27:03 for ndnSIM by
1.8.7