Vowpal Wabbit
Public Member Functions | List of all members
VW::io::reader Struct 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

VW::io::reader::reader ( bool  is_resettable)
inline
virtual VW::io::reader::~reader ( )
virtualdefault
VW::io::reader::reader ( reader other)
delete
VW::io::reader::reader ( reader &&  other)
delete

Member Function Documentation

bool VW::io::reader::is_resettable ( ) const
inline
Returns
true if this reader can be reset, otherwise false
reader& VW::io::reader::operator= ( reader other)
delete
reader& VW::io::reader::operator= ( reader &&  other)
delete
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
virtual void VW::io::reader::reset ( )
inlinevirtual

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 struct was generated from the following file: