MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
mtcore::io::readers Namespace Reference

Additional algorithms that can be done on a reader without having to extend the reader type We're encouraging this method of extending readers to avoid readers from becoming incredibly large, and to create a standardized extension mechanism to allow 3rd party extensions of readers. More...

Typedefs

template<ReaderImpl RI>
using Reader = Reader<RI>
 

Functions

template<typename T>
Result< typename Reader< T >::ResSlice, typename Reader< T >::ErrType > read_until_or_eof (Reader< T > &self, typename Reader< T >::BuffSlice buff, const std::remove_const_t< typename Reader< T >::ReadElem > &delim)
 Reads data from a reader into a Slice up until there is either a delimiter or end of file If the buffer is not big enough, the error SIZE_EXCEEDED will be returned.
 
template<typename T>
Result< typename Reader< T >::BuffSlice, typename Reader< T >::ErrType > read_until_or_eof (Reader< T > &self, Allocator &alloc, const std::remove_const_t< typename Reader< T >::ReadElem > &delim, size_t maxSize=std::numeric_limits< size_t >::max())
 Reads data from a reader into an allocated Slice up until there is either a delimiter or end of file If the buffer is not big enough, the error SIZE_EXCEEDED will be returned Will return a Slice that the caller MUST clean up with alloc.destroy_many() Will try to shrink internal buffer before returning.
 
template<typename T>
Result< typename Reader< T >::ResSlice, typename Reader< T >::ErrType > read_until_no_eof (Reader< T > &self, typename Reader< T >::BuffSlice buff, const std::remove_const_t< typename Reader< T >::ReadElem > &delim)
 Reads data from a reader into a Slice up until there is either a delimiter If the buffer is not big enough, the error SIZE_EXCEEDED will be returned If the end of file is reached, the error END_OF_FILE will be returned.
 
template<typename T>
Result< typename Reader< T >::BuffSlice, typename Reader< T >::ErrType > read_until_no_eof (Reader< T > &self, Allocator &alloc, const std::remove_const_t< typename Reader< T >::ReadElem > &delim, size_t maxSize=std::numeric_limits< size_t >::max())
 Reads data from a reader into an allocated Slice up until there is either a delimiter If the buffer is not big enough, the error SIZE_EXCEEDED will be returned If the end of file is reached, the error END_OF_FILE will be returned Will return a Slice that the caller MUST clean up with alloc.destroy_many() Will try to shrink internal buffer before returning.
 

Detailed Description

Additional algorithms that can be done on a reader without having to extend the reader type We're encouraging this method of extending readers to avoid readers from becoming incredibly large, and to create a standardized extension mechanism to allow 3rd party extensions of readers.

Typedef Documentation

◆ Reader

template<ReaderImpl RI>
using mtcore::io::readers::Reader = Reader<RI>

Definition at line 284 of file io/reader.hpp.