27 virtual bool CanRead()
const override;
29 virtual bool CanWrite()
const override;
31 virtual bool CanSeek()
const override;
39 virtual bool Open()
override;
41 virtual void Close()
override;
43 virtual void Write(
const void* ptr,
Size numBytes)
override;
49 virtual void Flush()
override;
51 virtual bool Eof()
const override;
53 virtual void*
Map()
override;
55 virtual void Unmap()
override;
A stream to which offers read/write access to filesystem files.
Definition filestream.h:19
virtual ~FileStream()
destructor
Definition filestream.cc:30
virtual Position GetPosition() const override
get the current position of the read/write cursor
Definition filestream.cc:89
virtual void Unmap() override
unmap stream
Definition filestream.cc:228
virtual bool CanSeek() const override
supports seeking?
Definition filestream.cc:60
virtual Size GetSize() const override
get the size of the stream in bytes
Definition filestream.cc:79
virtual bool CanWrite() const override
supports writing?
Definition filestream.cc:51
virtual void * Map() override
map stream to memory
Definition filestream.cc:210
virtual Size Read(void *ptr, Size numBytes) override
directly read from the stream
Definition filestream.cc:160
__DeclareClass(FileStream)
virtual bool Eof() const override
return true if end-of-stream reached
Definition filestream.cc:198
FSWrapper::Handle mapHandle
Definition filestream.h:63
FileStream()
constructor
Definition filestream.cc:19
FSWrapper::Handle handle
Definition filestream.h:62
virtual bool Open() override
open the stream
Definition filestream.cc:99
virtual bool CanRead() const override
supports reading?
Definition filestream.cc:42
void * mappedContent
Definition filestream.h:64
virtual void Close() override
close the stream
Definition filestream.cc:123
virtual void Seek(Offset offset, SeekOrigin origin) override
seek in stream
Definition filestream.cc:174
virtual void * MemoryMap() override
memory map stream to memory
Definition filestream.cc:240
virtual void Flush() override
flush unsaved data
Definition filestream.cc:186
virtual bool CanBeMapped() const override
supports memory mapping (read-only)?
Definition filestream.cc:70
virtual void MemoryUnmap() override
unmap memory stream
Definition filestream.cc:252
Offers an abstract interface for read/write access to a sequence of bytes.
Definition stream.h:28
SeekOrigin
seek origins
Definition stream.h:54
int64_t Offset
Definition stream.h:33
int64_t Position
typedefs
Definition stream.h:32
int64_t Size
Definition stream.h:34
Instances of wrapped stream classes.
Definition orientation.cc:10
@ Write
Definition filewatcher.h:47