Actions
Task #2951
closedImprovements with Block helpers
Start date:
06/24/2015
Due date:
% Done:
100%
Estimated time:
Description
This task includes several improvements:
- complete doxygen documentation for all helper
- move implementation to
.cpp
where possible - add additional helpers to encode/read
std::string
Updated by Alex Afanasyev over 9 years ago
- Status changed from New to Code review
Updated by Junxiao Shi over 9 years ago
Design question (probably not directly related to this issue):
Templates that accept EncodingBuffer
and EncodingEstimator
are declared as:
template<Tag TAG>
size_t
wireEncode(EncodingImpl<TAG>& encoder);
and instantiated as:
template
size_t
wireEncode<EncoderTag>(EncodingImpl<EncoderTag>& encoder);
template
size_t
wireEncode<EstimatorTag>(EncodingImpl<EstimatorTag>& estimator);
An alternate is to declare the template as:
template<typename Encoder>
size_t
wireEncode(Encoder& encoder);
and instantiated as:
template
size_t
wireEncode<EncodingBuffer>(EncodingBuffer& encoder);
template
size_t
wireEncode<EncodingEstimator>(EncodingEstimator& estimator);
What's the rationale of choosing the first over the second?
Updated by Alex Afanasyev over 9 years ago
The reason I chose to use "bool" as a template parameter to guarantee that there can be only two versions of this method in existence: one with true and one with false.
Updated by Alex Afanasyev over 9 years ago
- Status changed from Code review to Closed
Updated by Junxiao Shi over 9 years ago
- Related to Bug #2996: Build error in state.cpp added
Actions