mitteLib
Loading...
Searching...
No Matches
mlab::bin_stream Class Reference

#include <bin_data.hpp>

Collaboration diagram for mlab::bin_stream:

Public Member Functions

 bin_stream ()=default
 
 bin_stream (bin_data const &data, std::size_t position=0)
 
void seek (std::intptr_t offset, stream_ref ref=stream_ref::beg)
 
std::size_t tell (stream_ref ref=stream_ref::beg) const
 
std::size_t remaining () const
 
template<class OutputIterator >
std::size_t read (OutputIterator it, std::size_t n)
 
range< bin_data::const_iterator > read (std::size_t n)
 
std::uint8_t pop ()
 
std::uint8_t peek_one ()
 
range< bin_data::const_iterator > peek () const
 
bool good () const
 
bool eof () const
 
bool bad () const
 
void set_bad ()
 
void clear_bad ()
 

Private Member Functions

std::size_t get_ref (stream_ref ref) const
 

Private Attributes

bin_data const * _data = nullptr
 
std::size_t _pos = 0
 
bool _bad = false
 

Constructor & Destructor Documentation

◆ bin_stream() [1/2]

mlab::bin_stream::bin_stream ( )
default

◆ bin_stream() [2/2]

mlab::bin_stream::bin_stream ( bin_data const & data,
std::size_t position = 0 )
inlineexplicit

Member Function Documentation

◆ bad()

bool mlab::bin_stream::bad ( ) const
inlinenodiscard

◆ clear_bad()

void mlab::bin_stream::clear_bad ( )
inline

◆ eof()

bool mlab::bin_stream::eof ( ) const
inlinenodiscard

◆ get_ref()

std::size_t mlab::bin_stream::get_ref ( stream_ref ref) const
inlinenodiscardprivate

◆ good()

bool mlab::bin_stream::good ( ) const
inlinenodiscard

◆ peek()

range< bin_data::const_iterator > mlab::bin_stream::peek ( ) const
inlinenodiscard

◆ peek_one()

std::uint8_t mlab::bin_stream::peek_one ( )
inlinenodiscard

◆ pop()

std::uint8_t mlab::bin_stream::pop ( )
inline

◆ read() [1/2]

template<class OutputIterator >
std::size_t mlab::bin_stream::read ( OutputIterator it,
std::size_t n )

◆ read() [2/2]

range< bin_data::const_iterator > mlab::bin_stream::read ( std::size_t n)
inline

◆ remaining()

std::size_t mlab::bin_stream::remaining ( ) const
inlinenodiscard

◆ seek()

void mlab::bin_stream::seek ( std::intptr_t offset,
stream_ref ref = stream_ref::beg )
inline

◆ set_bad()

void mlab::bin_stream::set_bad ( )
inline

◆ tell()

std::size_t mlab::bin_stream::tell ( stream_ref ref = stream_ref::beg) const
inlinenodiscard

Member Data Documentation

◆ _bad

bool mlab::bin_stream::_bad = false
private

◆ _data

bin_data const* mlab::bin_stream::_data = nullptr
private

◆ _pos

std::size_t mlab::bin_stream::_pos = 0
private

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