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
Classes
Files
File List
File Members
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 "../encoding/encoding-buffer.hpp"
29
#include "../encoding/block-helpers.hpp"
30
31
#include "
tlv.hpp
"
32
33
namespace
ndn
{
34
namespace
lp {
35
39
enum class
CachePolicyType
{
40
NONE
= 0,
41
NO_CACHE
= 1
42
};
43
44
std::ostream&
45
operator<<
(std::ostream& os,
CachePolicyType
policy);
46
50
class
CachePolicy
51
{
52
public
:
53
class
Error
:
public
ndn::tlv::Error
54
{
55
public
:
56
explicit
57
Error
(
const
std::string& what)
58
:
ndn
::tlv::
Error
(what)
59
{
60
}
61
};
62
63
CachePolicy
();
64
65
explicit
66
CachePolicy
(
const
Block
& block);
67
73
template
<encoding::Tag TAG>
74
size_t
75
wireEncode(EncodingImpl<TAG>& encoder)
const
;
76
80
const
Block
&
81
wireEncode()
const
;
82
86
void
87
wireDecode(
const
Block
& wire);
88
89
public
:
// policy type
94
CachePolicyType
95
getPolicy()
const
;
96
101
CachePolicy
&
102
setPolicy(
CachePolicyType
policy);
103
104
private
:
105
CachePolicyType
m_policy;
106
mutable
Block
m_wire;
107
};
108
109
}
// namespace lp
110
}
// namespace ndn
111
112
#endif // NDN_CXX_LP_CACHE_POLICY_HPP
ndn::lp::CachePolicy
represents a CachePolicy header field
Definition:
cache-policy.hpp:50
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:53
ndn::lp::CachePolicy::Error::Error
Error(const std::string &what)
Definition:
cache-policy.hpp:57
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:39
ndn::lp::operator<<
std::ostream & operator<<(std::ostream &os, CachePolicyType policy)
Definition:
cache-policy.cpp:30
ndn::lp::tlv::CachePolicy
Definition:
tlv.hpp:41
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 Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11