5 #include <boost/asio/buffer.hpp> 6 #include <boost/core/noncopyable.hpp> 7 #include <boost/optional.hpp> 14 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf,
15 std::array<uint8_t, N>& res)
19 const auto byte = boost::asio::buffer(buf, 1);
20 b = *boost::asio::buffer_cast<
const uint8_t*>(
byte);
21 buf = buf +
sizeof(uint8_t);
25 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf,
double& res);
26 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf,
float& res);
27 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf, int32_t& res);
28 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf, uint64_t& res);
29 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf, uint32_t& res);
30 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf, uint16_t& res);
31 boost::asio::const_buffer&
operator>>(boost::asio::const_buffer& buf, uint8_t& res);
39 : offsetInMask(offsetInMask), bytesCount(bytesCount)
44 void parse(boost::asio::const_buffer& buffer,
const tBitMask& mask,
47 virtual void parse(boost::asio::const_buffer& buffer,
MemoryBlockParser()=delete
std::shared_ptr< MemoryBlockParser > MemoryBlockParserPtr
size_t getBytesCount(void) const
virtual ~MemoryBlockParser()=default
MemoryBlockParser(size_t offsetInMask, size_t bytesCount)
void parse(boost::asio::const_buffer &buffer, const tBitMask &mask, Data::BinaryNav &outBinaryNav)
const size_t offsetInMask
size_t getOffsetInMask(void) const
std::bitset< 32 > tBitMask
boost::asio::const_buffer & operator>>(boost::asio::const_buffer &buf, std::array< uint8_t, N > &res)