7 #ifndef CAFU_FILESYS_FILE_MEMORY_HPP_INCLUDED
8 #define CAFU_FILESYS_FILE_MEMORY_HPP_INCLUDED
11 #include "Templates/Array.hpp"
39 uint32_t
Read(
char* Buffer, uint32_t Size);
47 unsigned long ReadPos;
56 MemoryOutFileT(const std::string& FileName_);
58 // Implement all the (pure) virtual methods of the FileI and OutFileI interfaces.
60 const std::string& GetBaseName() const;
61 const std::string& GetFullName() const;
62 uint64_t GetPos() const;
63 bool Seek(int32_t Offset, SeekFromT SeekFrom);
64 void Write(const char* Buffer, uint32_t Size);
bool Seek(int32_t Offset, SeekFromT SeekFrom)
Modifies the position of the read/write pointer in the file.
Definition: File_memory.cpp:44
bool IsOpen() const
Returns whether the file has successfully been opened and is still open.
Definition: File_memory.cpp:20
const std::string & GetFullName() const
Returns the full name of this file.
Definition: File_memory.cpp:32
const ArrayT< char > & GetBuffer() const
Returns a const reference to the buffer that keeps the contents of this file.
Definition: File_memory.hpp:30
Definition: File_memory.hpp:18
ArrayT< char > & GetBuffer()
Returns a reference to the buffer that keeps the contents of this file.
Definition: File_memory.hpp:27
uint32_t Read(char *Buffer, uint32_t Size)
Reads Size bytes into the Buffer.
Definition: File_memory.cpp:76
SeekFromT
The values of this enumeration define from where the seek operation applies the offset.
Definition: File.hpp:28
const std::string & GetBaseName() const
Returns the base name of this file. The base name is relative to and agnostic of the file system this...
Definition: File_memory.cpp:26
MemoryInFileT(const std::string &FileName_)
Constructor.
Definition: File_memory.cpp:13
uint64_t GetPos() const
Returns the current read/write position in the file.
Definition: File_memory.cpp:38
uint64_t GetSize() const
Returns the size of the file.
Definition: File_memory.cpp:91