encoding: Improving structure and documentation of block helpers
This commit add several new helpers to simplify operations with
std::string:
- prependStringBlock
- makeStringBlock
- readString
The following functions are deprecated and their replacements:
- nonNegativeIntegerBlock (use makeNonNegativeIntegerBlock)
- prependBooleanBlock (use prependEmptyBlock)
- booleanBlock (use makeEmptyBlock)
- dataBlock (use makeBinaryBlock)
- nestedBlock (use makeNestedBlock)
Change-Id: Ic595ae64fc9c80c2c04e5fde1d8812e8b9debd60
Refs: #2951
diff --git a/src/link.cpp b/src/link.cpp
index ce05b36..b900450 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -24,7 +24,6 @@
#include "encoding/block-helpers.hpp"
#include "util/crypto.hpp"
#include "security/key-chain.hpp"
-#include "util/concepts.hpp"
#include <algorithm>
@@ -34,6 +33,7 @@
BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Link>));
BOOST_CONCEPT_ASSERT((WireEncodable<Link>));
+BOOST_CONCEPT_ASSERT((WireEncodableWithEncodingBuffer<Link>));
BOOST_CONCEPT_ASSERT((WireDecodable<Link>));
static_assert(std::is_base_of<Data::Error, Link::Error>::value,
"Link::Error should inherit from Data::Error");
@@ -109,10 +109,10 @@
}
template size_t
-Link::encodeContent<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
+Link::encodeContent<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>& encoder) const;
template size_t
-Link::encodeContent<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
+Link::encodeContent<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>& encoder) const;
void
Link::encodeContent()