NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
content-store-impl.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#include "
content-store-impl.hpp
"
21
22
#include "../../utils/trie/random-policy.hpp"
23
#include "../../utils/trie/lru-policy.hpp"
24
#include "../../utils/trie/fifo-policy.hpp"
25
#include "../../utils/trie/lfu-policy.hpp"
26
#include "../../utils/trie/multi-policy.hpp"
27
#include "../../utils/trie/aggregate-stats-policy.hpp"
28
29
#define NS_OBJECT_ENSURE_REGISTERED_TEMPL(type, templ) \
30
static struct X##type##templ##RegistrationClass { \
31
X##type##templ##RegistrationClass() \
32
{ \
33
ns3::TypeId tid = type<templ>::GetTypeId(); \
34
tid.GetParent(); \
35
} \
36
} x_##type##templ##RegistrationVariable
37
38
namespace
ns3
{
39
namespace
ndn
{
40
41
using namespace
ndnSIM;
42
43
namespace
cs {
44
45
// explicit instantiation and registering
49
template
class
ContentStoreImpl<lru_policy_traits>
;
50
54
template
class
ContentStoreImpl<random_policy_traits>
;
55
59
template
class
ContentStoreImpl<fifo_policy_traits>
;
60
64
template
class
ContentStoreImpl<lfu_policy_traits>
;
65
66
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
, lru_policy_traits);
67
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
, random_policy_traits);
68
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
, fifo_policy_traits);
69
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
, lfu_policy_traits);
70
71
typedef
multi_policy_traits<boost::mpl::vector2<lru_policy_traits, aggregate_stats_policy_traits>>
72
LruWithCountsTraits
;
73
typedef
multi_policy_traits<boost::mpl::vector2<random_policy_traits,
74
aggregate_stats_policy_traits>>
75
RandomWithCountsTraits
;
76
typedef
multi_policy_traits<boost::mpl::vector2<fifo_policy_traits, aggregate_stats_policy_traits>>
77
FifoWithCountsTraits
;
78
typedef
multi_policy_traits<boost::mpl::vector2<lfu_policy_traits, aggregate_stats_policy_traits>>
79
LfuWithCountsTraits
;
80
81
template
class
ContentStoreImpl<LruWithCountsTraits>
;
82
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
,
LruWithCountsTraits
);
83
84
template
class
ContentStoreImpl<RandomWithCountsTraits>
;
85
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
,
RandomWithCountsTraits
);
86
87
template
class
ContentStoreImpl<FifoWithCountsTraits>
;
88
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
,
FifoWithCountsTraits
);
89
90
template
class
ContentStoreImpl<LfuWithCountsTraits>
;
91
NS_OBJECT_ENSURE_REGISTERED_TEMPL
(
ContentStoreImpl
,
LfuWithCountsTraits
);
92
93
#ifdef DOXYGEN
94
// /**
95
// * \brief Content Store implementing LRU cache replacement policy
96
// */
97
class
Lru
:
public
ContentStoreImpl<lru_policy_traits>
{
98
};
99
103
class
Fifo
:
public
ContentStoreImpl<fifo_policy_traits>
{
104
};
105
109
class
Random
:
public
ContentStoreImpl<random_policy_traits>
{
110
};
111
115
class
Lfu
:
public
ContentStoreImpl<lfu_policy_traits>
{
116
};
117
#endif
118
119
}
// namespace cs
120
}
// namespace ndn
121
}
// namespace ns3
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ns3::ndn::cs::Lru
Content Store implementing LRU cache replacement policy.
Definition:
content-store-impl.cpp:97
ns3::ndn::cs::Fifo
Content Store implementing FIFO cache replacement policy.
Definition:
content-store-impl.cpp:103
ns3::ndn::cs::Lfu
Content Store implementing Least Frequently Used cache replacement policy.
Definition:
content-store-impl.cpp:115
ns3::ndn::cs::RandomWithCountsTraits
multi_policy_traits< boost::mpl::vector2< random_policy_traits, aggregate_stats_policy_traits > > RandomWithCountsTraits
Definition:
content-store-impl.cpp:75
ns3::ndn::cs::LfuWithCountsTraits
multi_policy_traits< boost::mpl::vector2< lfu_policy_traits, aggregate_stats_policy_traits > > LfuWithCountsTraits
Definition:
content-store-impl.cpp:79
content-store-impl.hpp
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::cs::LruWithCountsTraits
multi_policy_traits< boost::mpl::vector2< lru_policy_traits, aggregate_stats_policy_traits > > LruWithCountsTraits
Definition:
content-store-impl.cpp:72
NS_OBJECT_ENSURE_REGISTERED_TEMPL
#define NS_OBJECT_ENSURE_REGISTERED_TEMPL(type, templ)
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:29
ns3::ndn::cs::ContentStoreImpl< lru_policy_traits >
ns3::ndn::cs::Random
Content Store implementing Random cache replacement policy.
Definition:
content-store-impl.cpp:109
ns3::ndn::cs::FifoWithCountsTraits
multi_policy_traits< boost::mpl::vector2< fifo_policy_traits, aggregate_stats_policy_traits > > FifoWithCountsTraits
Definition:
content-store-impl.cpp:77
ndnSIM
model
cs
content-store-impl.cpp
Generated on Sun Feb 24 2019 22:16:05 for ndnSIM by
1.8.15