14 #pragma warning(disable : 4365 4987)
31 void close()
override;
32 std::uint64_t
tell()
override;
33 void seek(std::uint64_t position)
override;
34 std::uint64_t
size()
override;
35 std::size_t
read(
char* destination, std::size_t
size)
override;
37 std::size_t
write(
const char* source, std::size_t
size)
override;
MemoryResource is an abstract class that allows the implementation of polymorphic allocators.
Definition: MemoryResource.h:17
Definition: FileStreamImpl.h:26
NativeString filePath
Definition: FileStreamImpl.h:44
MemoryResource * memRes
Definition: FileStreamImpl.h:48
std::fstream file
Definition: FileStreamImpl.h:43
std::size_t write(const char *source, std::size_t size) override
Writes bytes from the given buffer to the stream.
Definition: FileStreamImpl.cpp:153
std::uint64_t tell() override
Get the current position in the stream.
Definition: FileStreamImpl.cpp:99
OpenMode fileOpenMode
Definition: FileStreamImpl.h:46
MemoryResource * getMemoryResource()
Definition: FileStreamImpl.cpp:204
void close() override
Close access to the stream.
Definition: FileStreamImpl.cpp:95
void seek(std::uint64_t position) override
Set the current position in the stream.
Definition: FileStreamImpl.cpp:103
std::uint64_t fileSize
Definition: FileStreamImpl.h:47
std::uint64_t size() override
Obtain size of stream in bytes.
Definition: FileStreamImpl.cpp:200
std::size_t read(char *destination, std::size_t size) override
Read bytes from stream into the given buffer.
Definition: FileStreamImpl.cpp:116
FileStreamImpl(const char *path_, AccessMode accessMode_, OpenMode openMode_, MemoryResource *memRes_)
Definition: FileStreamImpl.cpp:61
StreamStatus status
Definition: FileStreamImpl.h:49
void open() override
Open access to the stream.
Definition: FileStreamImpl.cpp:69
AccessMode fileAccessMode
Definition: FileStreamImpl.h:45
Standard file stream.
Definition: FileStream.h:13
Definition: Concepts.h:14
Definition: StreamStatus.h:11
Definition: Concepts.h:42
Definition: Concepts.h:10
AccessMode
Definition: Parameters.h:7
OpenMode
Definition: Parameters.h:13
pma::String< NativeCharacter > NativeString
Definition: NativeString.h:76