Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::mb_datastream< buffer_len > Class Template Reference

#include <message_buffer.hpp>

Public Member Functions

 mb_datastream (message_buffer< buffer_len > &m)
 
void skip (size_t s)
 
bool read (char *d, size_t s)
 
bool get (unsigned char &c)
 
bool get (char &c)
 

Detailed Description

template<uint32_t buffer_len>
class fc::mb_datastream< buffer_len >

Definition at line 292 of file message_buffer.hpp.

Constructor & Destructor Documentation

◆ mb_datastream()

template<uint32_t buffer_len>
fc::mb_datastream< buffer_len >::mb_datastream ( message_buffer< buffer_len > & m)
inlineexplicit

Definition at line 294 of file message_buffer.hpp.

294: mb(m) {}

Member Function Documentation

◆ get() [1/2]

template<uint32_t buffer_len>
bool fc::mb_datastream< buffer_len >::get ( char & c)
inline

Definition at line 306 of file message_buffer.hpp.

306{ return mb.read(&c, 1); }

◆ get() [2/2]

template<uint32_t buffer_len>
bool fc::mb_datastream< buffer_len >::get ( unsigned char & c)
inline

Definition at line 305 of file message_buffer.hpp.

305{ return mb.read(&c, 1); }

◆ read()

template<uint32_t buffer_len>
bool fc::mb_datastream< buffer_len >::read ( char * d,
size_t s )
inline

Definition at line 297 of file message_buffer.hpp.

297 {
298 if (mb.bytes_to_read() >= s) {
299 mb.read(d, s);
300 return true;
301 }
302 fc::detail::throw_datastream_range_error( "read", mb.bytes_to_read(), s - mb.bytes_to_read());
303 }
NO_RETURN void throw_datastream_range_error(const char *file, size_t len, int64_t over)
Definition datastream.cpp:4
char * s
Here is the call graph for this function:

◆ skip()

template<uint32_t buffer_len>
void fc::mb_datastream< buffer_len >::skip ( size_t s)
inline

Definition at line 296 of file message_buffer.hpp.

296{ mb.advance_read_ptr(s); }

The documentation for this class was generated from the following file: