maat::env::FileAccessor class

This class mimics a basic FILE* like structure used to read/write from a file

❱   Base classes

class maat::serial::Serializable
Virtual interface that serializable classes must implement.

❱   Constructors, destructors, conversion operators

FileAccessor()
If file accessor was deleted by the emulated program.

FileAccessor(physical_file_t physical_file, filehandle_t handle, const std::string& filename = "")
Create a new file.

❱   Public functions

auto write_buffer(const std::vector<Value>& buffer) -> unsigned int
Write abstract buffer to the file. Return the number of bytes written.

auto write_buffer(uint8_t* buffer, int len) -> unsigned int
Write concrete buffer to the file. Return the number of bytes written.

auto read_buffer(std::vector<Value>& buffer, unsigned int nb_elems, unsigned int elem_size) -> unsigned int
Read abstract buffer from the file. Return the number of bytes read.

auto class_uid() const -> serial::uid_t virtual
Return the class uid (see ClassId enum)

void dump(serial::Serializer&) const virtual
Dump the object contents in a serializer stream.

void load(serial::Deserializer&) virtual
Restore an object from a deserializer stream.

❱   Function documentation

maat::env::FileAccessor::FileAccessor()

If file accessor was deleted by the emulated program.

Dummy constructor used by deserializer