NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
content-store-with-freshness.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
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 
27 #define NS_OBJECT_ENSURE_REGISTERED_TEMPL(type, templ) \
28  static struct X##type##templ##RegistrationClass { \
29  X##type##templ##RegistrationClass() \
30  { \
31  ns3::TypeId tid = type<templ>::GetTypeId(); \
32  tid.GetParent(); \
33  } \
34  } x_##type##templ##RegistrationVariable
35 
36 namespace ns3 {
37 namespace ndn {
38 
39 using namespace ndnSIM;
40 
41 namespace cs {
42 
43 // explicit instantiation and registering
47 template class ContentStoreWithFreshness<lru_policy_traits>;
48 
52 template class ContentStoreWithFreshness<random_policy_traits>;
53 
57 template class ContentStoreWithFreshness<fifo_policy_traits>;
58 
62 template class ContentStoreWithFreshness<lfu_policy_traits>;
63 
64 NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, lru_policy_traits);
65 NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, random_policy_traits);
66 NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, fifo_policy_traits);
67 
68 NS_OBJECT_ENSURE_REGISTERED_TEMPL(ContentStoreWithFreshness, lfu_policy_traits);
69 
70 #ifdef DOXYGEN
71 // /**
72 // * \brief Content Store with freshness implementing LRU cache replacement policy
73 // */
75 };
76 
81 };
82 
87 };
88 
93 };
94 
95 #endif
96 
97 } // namespace cs
98 } // namespace ndn
99 } // namespace ns3
Content Store with freshness implementing LRU cache replacement policy.
#define NS_OBJECT_ENSURE_REGISTERED_TEMPL(type, templ)
Copyright (c) 2011-2015 Regents of the University of California.
Content Store with freshness implementing Least Frequently Used cache replacement policy...
Content Store with freshness implementing FIFO cache replacement policy.
Content Store with freshness implementing Random cache replacement policy.