28 #ifndef NDN_CXX_UTIL_CONCEPTS_HPP
29 #define NDN_CXX_UTIL_CONCEPTS_HPP
34 #include <boost/concept_check.hpp>
35 #include <boost/concept/usage.hpp>
36 #include <boost/type_traits/has_equal_to.hpp>
37 #include <boost/type_traits/has_not_equal_to.hpp>
38 #include <boost/type_traits/has_left_shift.hpp>
50 Block block = j.wireEncode();
67 size_t estimatedSize = j.wireEncode(estimator);
70 j.wireEncode(encoder);
102 static_assert(std::is_default_constructible_v<X>);
103 static_assert(boost::has_equal_to<X, X, bool>::value);
104 static_assert(boost::has_not_equal_to<X, X, bool>::value);
105 static_assert(boost::has_left_shift<std::ostream, X, std::ostream&>::value);
106 static_assert(std::is_convertible_v<typename X::Error*, tlv::Error*>,
107 "ndn::tlv::Error must be a public base of X::Error");
137 ,
public boost::DefaultConstructible<T>
149 #define NDN_CXX_ASSERT_FORWARD_ITERATOR(T) \
150 static_assert(std::is_default_constructible_v<T>, #T " must be default-constructible"); \
151 BOOST_CONCEPT_ASSERT((::ndn::detail::StlForwardIteratorConcept<T>))
Represents a TLV element of the NDN packet format.
size_t size() const
Returns the size of the encoded wire, i.e., of the whole TLV.
Concept check for an item in a Notification Stream.
Concept check for an item in a Status Dataset.
A concept check for TLV abstraction with a wireDecode(Block) method and constructible from Block.
BOOST_CONCEPT_USAGE(WireDecodable)
A concept check for TLV abstraction with a wireEncode(EncodingBuffer) method.
BOOST_CONCEPT_USAGE(WireEncodableWithEncodingBuffer)
A concept check for TLV abstraction with a wireEncode() method.
BOOST_CONCEPT_USAGE(WireEncodable)
BOOST_CONCEPT_USAGE(NfdMgmtProtocolStruct)
EncodingImpl< EstimatorTag > EncodingEstimator
EncodingImpl< EncoderTag > EncodingBuffer