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

#include <message_buffer.hpp>

Public Member Functions

 mb_peek_datastream (const 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_peek_datastream< buffer_len >

Definition at line 323 of file message_buffer.hpp.

Constructor & Destructor Documentation

◆ mb_peek_datastream()

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

Definition at line 325 of file message_buffer.hpp.

326 : mb( m ), index( m.read_index() ) {}

Member Function Documentation

◆ get() [1/2]

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

Definition at line 340 of file message_buffer.hpp.

340{ return mb.peek( &c, 1, index ); }

◆ get() [2/2]

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

Definition at line 339 of file message_buffer.hpp.

339{ return mb.peek( &c, 1, index ); }

◆ read()

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

Definition at line 330 of file message_buffer.hpp.

330 {
331 if( mb.bytes_to_read_from_index(index) >= s ) {
332 mb.peek( d, s, index );
333 return true;
334 }
336 mb.bytes_to_read_from_index(index), s - mb.bytes_to_read_from_index(index) );
337 }
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_peek_datastream< buffer_len >::skip ( size_t s)
inline

Definition at line 328 of file message_buffer.hpp.

static void advance_index(index_t &index, uint32_t bytes)
Here is the call graph for this function:

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