Vowpal Wabbit
Loading...
Searching...
No Matches
Public Member Functions | List of all members
VW::io::reader Class Referenceabstract

#include <io_adapter.h>

Public Member Functions

 reader (bool is_resettable)
 
virtual ~reader ()=default
 
virtual ssize_t read (char *buffer, size_t num_bytes)=0
 
virtual void reset ()
 
bool is_resettable () const
 
 reader (reader &other)=delete
 
readeroperator= (reader &other)=delete
 
 reader (reader &&other)=delete
 
readeroperator= (reader &&other)=delete
 

Constructor & Destructor Documentation

◆ reader() [1/3]

VW::io::reader::reader ( bool  is_resettable)
inline

◆ ~reader()

virtual VW::io::reader::~reader ( )
virtualdefault

◆ reader() [2/3]

VW::io::reader::reader ( reader other)
delete

◆ reader() [3/3]

VW::io::reader::reader ( reader &&  other)
delete

Member Function Documentation

◆ is_resettable()

bool VW::io::reader::is_resettable ( ) const
inline
Returns
true if this reader can be reset, otherwise false

◆ operator=() [1/2]

reader & VW::io::reader::operator= ( reader &&  other)
delete

◆ operator=() [2/2]

reader & VW::io::reader::operator= ( reader other)
delete

◆ read()

virtual ssize_t VW::io::reader::read ( char *  buffer,
size_t  num_bytes 
)
pure virtual

Read num_bytes into buffer from this reader

Parameters
bufferbuffer to read into, must be at least num_bytes in size otherwise this is undefined behavior
num_bytesthe number of bytes to read
Returns
the number of bytes successfully read into buffer

◆ reset()

virtual void VW::io::reader::reset ( )
virtual

This function will throw if the reader does not support reseting. Users should check if this io_adapter is resetable before trying to reset.

Exceptions
VW::vw_exceptionif reader does not support resetting.

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