NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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
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::tlv::CachePolicy
Definition:
tlv.hpp:42
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 Wed Jan 11 2017 18:17:13 for ndnSIM by
1.8.13