HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Filesystem::IOMemReader Class Reference

IOProxy subclass for reading that wraps an cspan<char>. More...

#include <filesystem.h>

+ Inheritance diagram for Filesystem::IOMemReader:

Public Member Functions

 IOMemReader (void *buf, size_t size)
 
 IOMemReader (cspan< unsigned char > buf)
 
virtual const char * proxytype () const
 
virtual bool seek (int64_t offset)
 
virtual size_t read (void *buf, size_t size)
 
virtual size_t pread (void *buf, size_t size, int64_t offset)
 
virtual size_t size () const
 
cspan< unsigned char > buffer () const noexcept
 
- Public Member Functions inherited from Filesystem::IOProxy
 IOProxy ()
 
 IOProxy (string_view filename, Mode mode)
 
 IOProxy (const std::wstring &filename, Mode mode)
 
virtual ~IOProxy ()
 
virtual void close ()
 
virtual bool opened () const
 
virtual int64_t tell ()
 
virtual size_t write (const void *buf, size_t size)
 
virtual size_t pwrite (const void *buf, size_t size, int64_t offset)
 
virtual void flush () const
 
Mode mode () const
 
const std::stringfilename () const
 
template<class T >
size_t read (span< T > buf)
 
template<class T >
size_t write (span< T > buf)
 
size_t write (string_view buf)
 
bool seek (int64_t offset, int origin)
 
std::string error () const
 
void error (string_view e)
 

Protected Attributes

cspan< unsigned char > m_buf
 
- Protected Attributes inherited from Filesystem::IOProxy
std::string m_filename
 
int64_t m_pos = 0
 
Mode m_mode = Closed
 
std::string m_error
 

Additional Inherited Members

- Public Types inherited from Filesystem::IOProxy
enum  Mode { Closed = 0, Read = 'r', Write = 'w' }
 

Detailed Description

IOProxy subclass for reading that wraps an cspan<char>.

Definition at line 502 of file filesystem.h.

Constructor & Destructor Documentation

Filesystem::IOMemReader::IOMemReader ( void buf,
size_t  size 
)
inline

Definition at line 504 of file filesystem.h.

Filesystem::IOMemReader::IOMemReader ( cspan< unsigned char >  buf)
inline

Definition at line 509 of file filesystem.h.

Member Function Documentation

cspan<unsigned char> Filesystem::IOMemReader::buffer ( ) const
inlinenoexcept

Definition at line 525 of file filesystem.h.

virtual size_t Filesystem::IOMemReader::pread ( void buf,
size_t  size,
int64_t  offset 
)
virtual

Reimplemented from Filesystem::IOProxy.

virtual const char* Filesystem::IOMemReader::proxytype ( ) const
inlinevirtual

Implements Filesystem::IOProxy.

Definition at line 514 of file filesystem.h.

virtual size_t Filesystem::IOMemReader::read ( void buf,
size_t  size 
)
virtual

Reimplemented from Filesystem::IOProxy.

virtual bool Filesystem::IOMemReader::seek ( int64_t  offset)
inlinevirtual

Reimplemented from Filesystem::IOProxy.

Definition at line 515 of file filesystem.h.

virtual size_t Filesystem::IOMemReader::size ( void  ) const
inlinevirtual

Reimplemented from Filesystem::IOProxy.

Definition at line 522 of file filesystem.h.

Member Data Documentation

cspan<unsigned char> Filesystem::IOMemReader::m_buf
protected

Definition at line 528 of file filesystem.h.


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