NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
g
i
k
l
m
n
p
r
s
u
w
+
Related Functions
b
c
d
f
i
k
l
n
o
p
s
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
cache-policy.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
24
#ifndef NDN_CXX_LP_CACHE_POLICY_HPP
25
#define NDN_CXX_LP_CACHE_POLICY_HPP
26
27
#include "../common.hpp"
28
#include "../tag.hpp"
29
#include "../encoding/encoding-buffer.hpp"
30
#include "../encoding/block-helpers.hpp"
31
32
#include "
tlv.hpp
"
33
34
namespace
ndn
{
35
namespace
lp
{
36
40
enum class
CachePolicyType
{
41
NONE
= 0,
42
NO_CACHE
= 1
43
};
44
45
std::ostream&
46
operator<<
(std::ostream& os,
CachePolicyType
policy);
47
51
class
CachePolicy
52
{
53
public
:
54
class
Error
:
public
ndn::tlv::Error
55
{
56
public
:
57
explicit
58
Error
(
const
std::string& what)
59
:
ndn
::tlv::
Error
(what)
60
{
61
}
62
};
63
64
CachePolicy
();
65
66
explicit
67
CachePolicy
(
const
Block
& block);
68
74
template
<encoding::Tag TAG>
75
size_t
76
wireEncode(
EncodingImpl<TAG>
& encoder)
const
;
77
81
const
Block
&
82
wireEncode()
const
;
83
87
void
88
wireDecode(
const
Block
& wire);
89
90
public
:
// policy type
95
CachePolicyType
96
getPolicy()
const
;
97
102
CachePolicy
&
103
setPolicy(
CachePolicyType
policy);
104
105
private
:
106
CachePolicyType
m_policy;
107
mutable
Block
m_wire;
108
};
109
110
}
// namespace lp
111
}
// namespace ndn
112
113
#endif // NDN_CXX_LP_CACHE_POLICY_HPP
ndn::lp::CachePolicy
represents a CachePolicy header field
Definition:
cache-policy.hpp:51
ndn::lp::CachePolicyType::NO_CACHE
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::lp::CachePolicy::Error
Definition:
cache-policy.hpp:54
ndn::lp::CachePolicy::Error::Error
Error(const std::string &what)
Definition:
cache-policy.hpp:58
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::lp::tlv::CachePolicy
Definition:
tlv.hpp:41
tlv.hpp
ndn::lp::CachePolicyType::NONE
ndn::lp::CachePolicyType
CachePolicyType
indicates the cache policy applied to a Data packet
Definition:
cache-policy.hpp:40
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::lp::operator<<
std::ostream & operator<<(std::ostream &os, CachePolicyType policy)
Definition:
cache-policy.cpp:30
ndn::lp
Definition:
cache-policy.cpp:27
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndnSIM
ndn-cxx
src
lp
cache-policy.hpp
Generated on Sat Nov 12 2016 16:02:52 for ndnSIM by
1.8.12