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
ndnSIM
ndnSIM documentation
All Attributes
All GlobalValues
All LogComponents
All TraceSources
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
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/type_traits.hpp>
29
30
namespace
ndn
{
31
namespace
lp {
32
36
namespace
field_location_tags {
37
38
class
Base
39
{
40
};
41
45
class
Header
:
public
Base
46
{
47
};
48
52
class
Fragment
:
public
Base
53
{
54
};
55
56
}
// namespace field_location_tags
57
61
template
<
class
X>
62
struct
Field
63
{
64
BOOST_CONCEPT_ASSERT((boost::is_base_of<field_location_tags::Base, typename X::FieldLocation>));
65
BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<typename X::ValueType>));
66
BOOST_CONCEPT_ASSERT((boost::CopyConstructible<typename X::ValueType>));
67
BOOST_CONCEPT_ASSERT((boost::is_same<typename X::TlvType::value_type, uint64_t>));
68
BOOST_CONCEPT_ASSERT((boost::is_same<typename X::IsRepeatable::value_type, bool>));
69
BOOST_CONCEPT_USAGE
(
Field
)
70
{
71
Block
wire;
72
X j;
73
typename
X::ValueType decoded = j.decode(wire);
74
EncodingBuffer
enc;
75
j.encode(enc, decoded);
76
}
77
};
78
79
}
// namespace lp
80
}
// namespace ndn
81
82
#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:45
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:69
ndn::lp::field_location_tags::Fragment
the Fragment field
Definition:
field.hpp:52
ndn::encoding::EncodingBuffer
EncodingImpl< EncoderTag > EncodingBuffer
Definition:
encoding-buffer-fwd.hpp:45
ndn::lp::Field
concept check for fields
Definition:
field.hpp:62
ndn::lp::field_location_tags::Base
Definition:
field.hpp:38
ndnSIM
ndn-cxx
src
lp
field.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11