Bitcoin ABC 0.32.6
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
SpanReader Class Reference

Minimal stream for reading from an existing byte array by Span. More...

#include <streams.h>

Collaboration diagram for SpanReader:
[legend]

Public Member Functions

 SpanReader (Span< const uint8_t > data)
 
template<typename T >
SpanReaderoperator>> (T &obj)
 
size_t size () const
 
bool empty () const
 
void read (Span< std::byte > dst)
 

Private Attributes

Span< const uint8_t > m_data
 

Detailed Description

Minimal stream for reading from an existing byte array by Span.

Definition at line 79 of file streams.h.

Constructor & Destructor Documentation

◆ SpanReader()

SpanReader::SpanReader ( Span< const uint8_t >  data)
inline
Parameters
[in]dataReferenced byte vector to overwrite/append

Definition at line 87 of file streams.h.

Member Function Documentation

◆ empty()

bool SpanReader::empty ( ) const
inline

Definition at line 95 of file streams.h.

Here is the call graph for this function:

◆ operator>>()

template<typename T >
SpanReader & SpanReader::operator>> ( T &  obj)
inline

Definition at line 89 of file streams.h.

Here is the call graph for this function:

◆ read()

void SpanReader::read ( Span< std::byte >  dst)
inline

Definition at line 97 of file streams.h.

Here is the call graph for this function:

◆ size()

size_t SpanReader::size ( ) const
inline

Definition at line 94 of file streams.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_data

Span<const uint8_t> SpanReader::m_data
private

Definition at line 81 of file streams.h.


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