...
This commit is contained in:
@@ -68,6 +68,12 @@ public:
|
||||
|
||||
bool empty() const { return std::ranges::distance(_bytes.begin(), _bytes.end()) == 0; }
|
||||
|
||||
size_t byteSize() const
|
||||
{
|
||||
//
|
||||
return std::ranges::distance(_bytes.begin(), _bytes.end());
|
||||
}
|
||||
|
||||
// get a copy of message bytes
|
||||
template <traits::adc_output_char_range R>
|
||||
R bytes() const
|
||||
@@ -138,6 +144,17 @@ public:
|
||||
return emp;
|
||||
}
|
||||
|
||||
size_t byteSize() const
|
||||
{
|
||||
size_t sz = 0;
|
||||
|
||||
for (const auto& el : _bytes | std::views::drop(_reservedNum)) {
|
||||
sz += std::ranges::distance(el.begin(), el.end());
|
||||
}
|
||||
|
||||
return sz;
|
||||
}
|
||||
|
||||
// get a copy of message bytes
|
||||
template <traits::adc_output_char_range R>
|
||||
R bytes() const
|
||||
@@ -455,6 +472,12 @@ public:
|
||||
virtual ~AdcKeyTokenNetMessage() = default;
|
||||
|
||||
|
||||
size_t byteSize() const
|
||||
{
|
||||
size_t sz = base_t::template byteSize();
|
||||
return sz + std::distance(this->_bytesbyte[0].begin(), this->_bytes[0].end());
|
||||
}
|
||||
|
||||
// get a copy of message bytes
|
||||
template <traits::adc_output_char_range R>
|
||||
R bytes() const
|
||||
|
||||
Reference in New Issue
Block a user