NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
field.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_CXX_LP_FIELD_HPP
23
#define NDN_CXX_LP_FIELD_HPP
24
25
#include "../common.hpp"
26
#include "../encoding/encoding-buffer.hpp"
27
28
#include <boost/concept/assert.hpp>
29
#include <boost/concept/usage.hpp>
30
#include <boost/type_traits.hpp>
31
32
namespace
ndn
{
33
namespace
lp
{
34
38
namespace
field_location_tags {
39
40
class
Base
41
{
42
};
43
47
class
Header
:
public
Base
48
{
49
};
50
54
class
Fragment
:
public
Base
55
{
56
};
57
58
}
// namespace field_location_tags
59
63
template
<
class
X>
64
struct
Field
65
{
66
BOOST_CONCEPT_ASSERT((boost::is_base_of<field_location_tags::Base, typename X::FieldLocation>));
67
BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<typename X::ValueType>));
68
BOOST_CONCEPT_ASSERT((boost::CopyConstructible<typename X::ValueType>));
69
BOOST_CONCEPT_ASSERT((boost::is_same<typename X::TlvType::value_type, uint64_t>));
70
BOOST_CONCEPT_ASSERT((boost::is_same<typename X::IsRepeatable::value_type, bool>));
71
BOOST_CONCEPT_USAGE
(
Field
)
72
{
73
Block
wire;
74
X j;
75
typename
X::ValueType decoded = j.decode(wire);
76
EncodingBuffer
enc;
77
j.encode(enc, decoded);
78
}
79
};
80
81
}
// namespace lp
82
}
// namespace ndn
83
84
#endif // NDN_CXX_LP_FIELD_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::lp::field_location_tags::Header
a header field
Definition:
field.hpp:47
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::lp::Field::BOOST_CONCEPT_USAGE
BOOST_CONCEPT_USAGE(Field)
Definition:
field.hpp:71
ndn::lp::field_location_tags::Fragment
the Fragment field
Definition:
field.hpp:54
ndn::encoding::EncodingBuffer
EncodingImpl< EncoderTag > EncodingBuffer
Definition:
encoding-buffer-fwd.hpp:45
ndn::lp::Field
concept check for fields
Definition:
field.hpp:64
ndn::lp
Definition:
cache-policy.cpp:27
ndn::lp::field_location_tags::Base
Definition:
field.hpp:40
ndnSIM
ndn-cxx
src
lp
field.hpp
Generated on Sat Nov 12 2016 16:02:52 for ndnSIM by
1.8.12