BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Public Member Functions | Private Attributes | List of all members
VectorReader Class Reference

Minimal stream for reading from an existing vector by reference. More...

#include <streams.h>

Public Member Functions

 VectorReader (int type, int version, const std::vector< unsigned char > &data, size_t pos)
 
template<typename... Args>
 VectorReader (int type, int version, const std::vector< unsigned char > &data, size_t pos, Args &&... args)
 
template<typename T >
VectorReaderoperator>> (T &obj)
 
int GetVersion () const
 
int GetType () const
 
size_t size () const
 
bool empty () const
 
void read (char *dst, size_t n)
 
void seek (size_t n)
 

Private Attributes

const int m_type
 
const int m_version
 
const std::vector< unsigned char > & m_data
 
size_t m_pos = 0
 

Detailed Description

Minimal stream for reading from an existing vector by reference.

Definition at line 144 of file streams.h.

Constructor & Destructor Documentation

◆ VectorReader() [1/2]

VectorReader::VectorReader ( int  type,
int  version,
const std::vector< unsigned char > &  data,
size_t  pos 
)
inline

Definition at line 160 of file streams.h.

Here is the call graph for this function:

◆ VectorReader() [2/2]

template<typename... Args>
VectorReader::VectorReader ( int  type,
int  version,
const std::vector< unsigned char > &  data,
size_t  pos,
Args &&...  args 
)
inline

Definition at line 171 of file streams.h.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

bool VectorReader::empty ( ) const
inline

Definition at line 190 of file streams.h.

◆ GetType()

int VectorReader::GetType ( ) const
inline

Definition at line 187 of file streams.h.

◆ GetVersion()

int VectorReader::GetVersion ( ) const
inline

Definition at line 186 of file streams.h.

◆ operator>>()

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

Definition at line 179 of file streams.h.

Here is the call graph for this function:

◆ read()

void VectorReader::read ( char *  dst,
size_t  n 
)
inline

Definition at line 192 of file streams.h.

Here is the call graph for this function:

◆ seek()

void VectorReader::seek ( size_t  n)
inline

Definition at line 207 of file streams.h.

Here is the caller graph for this function:

◆ size()

size_t VectorReader::size ( ) const
inline

Definition at line 189 of file streams.h.

Member Data Documentation

◆ m_data

const std::vector<unsigned char>& VectorReader::m_data
private

Definition at line 149 of file streams.h.

◆ m_pos

size_t VectorReader::m_pos = 0
private

Definition at line 150 of file streams.h.

◆ m_type

const int VectorReader::m_type
private

Definition at line 147 of file streams.h.

◆ m_version

const int VectorReader::m_version
private

Definition at line 148 of file streams.h.


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