DNA Calib 1.1
Project brief
|
Standard file stream. More...
#include <FileStream.h>
Public Member Functions | |
FileStream ()=default | |
~FileStream () override | |
FileStream (const FileStream &)=delete | |
FileStream & | operator= (const FileStream &)=delete |
FileStream (FileStream &&)=default | |
FileStream & | operator= (FileStream &&)=default |
![]() | |
virtual | ~BoundedIOStream () |
![]() | |
virtual void | open ()=0 |
Open access to the stream. More... | |
![]() | |
virtual void | close ()=0 |
Close access to the stream. More... | |
![]() | |
virtual std::size_t | read (char *destination, std::size_t size)=0 |
Read bytes from stream into the given buffer. More... | |
virtual std::size_t | read (Writable *destination, std::size_t size)=0 |
Read bytes from this stream into the given stream. More... | |
![]() | |
virtual std::size_t | write (const char *source, std::size_t size)=0 |
Writes bytes from the given buffer to the stream. More... | |
virtual std::size_t | write (Readable *source, std::size_t size)=0 |
Writes bytes from the given stream to this stream. More... | |
![]() | |
virtual std::uint64_t | tell ()=0 |
Get the current position in the stream. More... | |
virtual void | seek (std::uint64_t position)=0 |
Set the current position in the stream. More... | |
![]() | |
virtual std::uint64_t | size ()=0 |
Obtain size of stream in bytes. More... | |
Static Public Member Functions | |
static FileStream * | create (const char *path, AccessMode accessMode, OpenMode openMode, MemoryResource *memRes=nullptr) |
Factory method for creation of a FileStream instance. More... | |
static void | destroy (FileStream *instance) |
Method for freeing a FileStream instance. More... | |
Additional Inherited Members | |
![]() | |
using | AccessMode = trio::AccessMode |
using | OpenMode = trio::OpenMode |
![]() | |
static const sc::StatusCode | OpenError {100, "Error opening file"} |
static const sc::StatusCode | ReadError {101, "Error reading file"} |
static const sc::StatusCode | WriteError {102, "Error writing file"} |
static const sc::StatusCode | AlreadyOpenError {103, "File already open"} |
static const sc::StatusCode | SeekError {104, "Error seeking file"} |
![]() | |
virtual | ~Controllable () |
![]() | |
virtual | ~Openable () |
![]() | |
virtual | ~Closeable () |
![]() | |
virtual | ~Readable () |
![]() | |
virtual | ~Writable () |
![]() | |
virtual | ~Seekable () |
![]() | |
virtual | ~Bounded () |
Standard file stream.
|
default |
|
overridedefault |
|
delete |
|
default |
|
static |
Factory method for creation of a FileStream instance.
path | UTF-8 encoded path to file to be opened. |
accessMode | Control whether the file is opened for reading or writing. |
openMode | Control whether the file is opened in binary or textual mode. |
memRes | The memory resource to be used for the allocation of the FileStream instance. |
|
static |
Method for freeing a FileStream instance.
instance | Instance of FileStream to be freed. |
|
delete |
|
default |