OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::core::make_stream_f Struct Reference

Function object to create a stream from various input types. More...

#include <stream.hpp>

Public Member Functions

contents_t operator() (char const *buffer, const size_t size) const
contents_t operator() (commit_t const &item) const
contents_t operator() (index_t const &item) const
contents_t operator() (std::ifstream &in) const
contents_t operator() (std::istringstream const &stream) const
contents_t operator() (std::string const &stream) const
contents_t operator() (std::string_view const &stream) const

Detailed Description

Function object to create a stream from various input types.

This functor provides overloads for creating a stream from different input types, including string views, strings, input streams, and commit/index objects. It returns a contents_t object representing the stream contents.

Member Function Documentation

◆ operator()() [1/7]

contents_t oxy::core::make_stream_f::operator() ( char const * buffer,
const size_t size ) const
inline
Parameters
bufferA pointer to a character buffer representing the input stream.
sizeThe size of the character buffer.
Returns
A contents_t object containing the stream contents.

◆ operator()() [2/7]

contents_t oxy::core::make_stream_f::operator() ( commit_t const & item) const
inline
Parameters
itemA commit object representing the input stream.
Returns
A contents_t object containing the stream contents.

References oxy::dumps().

◆ operator()() [3/7]

contents_t oxy::core::make_stream_f::operator() ( index_t const & item) const
inline
Parameters
itemAn index object representing the input stream.
Returns
A contents_t object containing the stream contents.

References oxy::dumps().

◆ operator()() [4/7]

contents_t oxy::core::make_stream_f::operator() ( std::ifstream & in) const
inline
Parameters
inAn input file stream representing the input stream.
Returns
A contents_t object containing the stream contents.

◆ operator()() [5/7]

contents_t oxy::core::make_stream_f::operator() ( std::istringstream const & stream) const
inline
Parameters
streamAn input string stream representing the input stream.
Returns
A contents_t object containing the stream contents.

◆ operator()() [6/7]

contents_t oxy::core::make_stream_f::operator() ( std::string const & stream) const
inline
Parameters
streamA string representing the input stream.
Returns
A contents_t object containing the stream contents.

◆ operator()() [7/7]

contents_t oxy::core::make_stream_f::operator() ( std::string_view const & stream) const
inline
Parameters
streamA string view representing the input stream.
Returns
A contents_t object containing the stream contents.