diff options
author | asuonpaa <34128694+asuonpaa@users.noreply.github.com> | 2020-04-14 16:06:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 09:06:06 -0400 |
commit | af654dcf8c14f4a296de754c865e10c751c2a91a (patch) | |
tree | 217e3aa1ca9ede1b7bc4f9199c4a8dbf11a656ed /include/amber/amber.h | |
parent | a40bef4dba98d2d80b48e5a940d8574fbfceb197 (diff) | |
download | amber-af654dcf8c14f4a296de754c865e10c751c2a91a.tar.gz |
Added implementation for loading buffer data from a binary file. (#838)
* Added implementation for loading buffer data from a binary file.
* Use PNG, BINARY, and TEXT to select the type of file to load buffer data from.
Diffstat (limited to 'include/amber/amber.h')
-rw-r--r-- | include/amber/amber.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/amber/amber.h b/include/amber/amber.h index b665de2..ddf5779 100644 --- a/include/amber/amber.h +++ b/include/amber/amber.h @@ -50,7 +50,7 @@ struct EngineConfig { virtual ~EngineConfig(); }; -/// Stores information for a biffer. +/// Stores information for a buffer. struct BufferInfo { BufferInfo(); BufferInfo(const BufferInfo&); @@ -70,6 +70,18 @@ struct BufferInfo { std::vector<Value> values; }; +/// Types of source file to load buffer data from. +enum class BufferDataFileType : int8_t { + /// Unknown file type + kUnknown = -1, + /// A text file + kText = 0, + /// A binary file + kBinary, + /// A PNG file + kPng +}; + /// Delegate class for various hook functions class Delegate { public: @@ -87,6 +99,7 @@ class Delegate { virtual bool LogExecuteCalls() const = 0; /// Loads buffer data from a file virtual amber::Result LoadBufferData(const std::string file_name, + BufferDataFileType file_type, amber::BufferInfo* buffer) const = 0; }; |