OGLplus  (0.59.0) a C++ wrapper for rendering APIs

Deserialization data source backed by an input stream. More...

#include <eagine/serialize/istream_source.hpp>

Public Member Functions

 istream_data_source (std::istream &in) noexcept
 Constructor setting the source stream.
 
auto top (span_size_t req_size) -> memory::const_block final
 Returns a block covering the specified amount of data of the top. More...
 
void pop (span_size_t del_size) final
 Returns the specified amount of data of the top of the source. More...
 
- Public Member Functions inherited from eagine::deserializer_data_source
template<typename Function >
auto scan_until (Function predicate, const valid_if_positive< span_size_t > &max, const valid_if_positive< span_size_t > &step={256}) -> valid_if_nonnegative< span_size_t >
 Returns the position of the first byte where predicate is true. More...
 
auto scan_for (byte what, const valid_if_positive< span_size_t > &max, const valid_if_positive< span_size_t > &step={256}) -> valid_if_nonnegative< span_size_t >
 Returns the position of the first occurrence of the specified byte. More...
 
void fetch_all (memory::buffer &dst, valid_if_positive< span_size_t > step={256})
 Fetches all the remaining data into a buffer.
 
- Public Member Functions inherited from eagine::interface< deserializer_data_source >
constexpr interface (const interface &)=delete
 Not copyable.
 
auto operator= (interface &&)=delete
 Not move assignable.
 
auto operator= (const interface &)=delete
 Not copy assignable.
 

Additional Inherited Members

- Protected Member Functions inherited from eagine::interface< deserializer_data_source >
constexpr interface () noexcept=default
 Default constructible by derived.
 
constexpr interface (interface &&) noexcept=default
 Move constructible by derived.
 

Detailed Description

Deserialization data source backed by an input stream.

See also
ostream_data_sink

Member Function Documentation

◆ pop()

void eagine::istream_data_source::pop ( span_size_t  size)
inlinefinalvirtual

Returns the specified amount of data of the top of the source.

See also
top

Implements eagine::deserializer_data_source.

◆ top()

auto eagine::istream_data_source::top ( span_size_t  size) -> memory::const_block
inlinefinalvirtual

Returns a block covering the specified amount of data of the top.

See also
pop
scan_until
scan_for

Implements eagine::deserializer_data_source.


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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).