Athena IO Library
|
Base DNA class used against 'atdna'. More...
#include <DNA.hpp>
Classes | |
struct | Align |
Meta Template signaling atdna to insert an aligning stream seek where it's used. More... | |
struct | Delete |
Meta Template preventing atdna from emitting read/write implementations. More... | |
struct | Seek |
Meta Template signaling atdna to insert a stream seek where it's used. More... | |
Public Types | |
template<typename T , Endian VE = DNAE> | |
using | Value = T |
Template type signaling atdna to capture the value where it's used. More... | |
template<typename T , size_t cntVar, Endian VE = DNAE> | |
using | Vector = std::vector< T > |
Template type wrapping std::vector and signaling atdna to manipulate it where it's used. More... | |
template<size_t sizeVar> | |
using | Buffer = struct athena::io::Buffer< sizeVar, DNAE > |
Template type wrapping std::unique_ptr<atUint8[]> and signaling atdna to read a raw byte-buffer where it's used. More... | |
template<atInt32 sizeVar = -1> | |
using | String = struct athena::io::String< sizeVar, DNAE > |
Template type wrapping std::string and signaling atdna to read string data where it's used. More... | |
template<atInt32 sizeVar = -1, Endian VE = DNAE> | |
using | WString = struct athena::io::WString< sizeVar, VE > |
Template type wrapping std::wstring and signaling atdna to read wstring data where it's used. More... | |
template<atInt32 sizeVar = -1> | |
using | WStringAsString = struct athena::io::WStringAsString< sizeVar, DNAE > |
Template type wrapping std::string and signaling atdna to read wstring data where it's used. More... | |
Public Member Functions | |
virtual void | read (IStreamReader &)=0 |
Common virtual read function for all DNA types. | |
virtual void | write (IStreamWriter &) const =0 |
Common virtual write function for all DNA types. | |
virtual size_t | binarySize (size_t __isz) const =0 |
Common virtual binary size computation for all DNA types. More... | |
Static Public Member Functions | |
template<typename T > | |
static size_t | __EnumerateSize (size_t __isz, const T &v) |
Internal DNA helper for accumulating binarySize. More... | |
Base DNA class used against 'atdna'.
DNAE | Default-endianness for contained DNA values |
Athena bundles a build-tool called 'atdna'. This tool functions just like the 'clang' compiler, except it emits a full .cpp implementation with all read/write calls necessary to marshal the DNA structure to/from a streamed medium
using athena::io::DNA< DNAE >::Buffer = struct athena::io::Buffer<sizeVar, DNAE> |
using athena::io::DNA< DNAE >::String = struct athena::io::String<sizeVar, DNAE> |
using athena::io::DNA< DNAE >::Value = T |
using athena::io::DNA< DNAE >::Vector = std::vector<T> |
Template type wrapping std::vector and signaling atdna to manipulate it where it's used.
T | The type of contained elements. Can be any numeric type, atVec* type, or another DNA subclass |
cntVar | C++ expression wrapped in DNA_COUNT macro to determine number of elements for vector |
VE | Endianness of the contained values |
using athena::io::DNA< DNAE >::WString = struct athena::io::WString<sizeVar, VE> |
using athena::io::DNA< DNAE >::WStringAsString = struct athena::io::WStringAsString<sizeVar, DNAE> |
|
inlinestatic |
|
pure virtual |
Common virtual binary size computation for all DNA types.
__isz | initial cumulative value to add result to |
Implemented in athena::io::WStringAsStringYaml< sizeVar, VE >, athena::io::WStringYaml< sizeVar, VE >, athena::io::StringYaml< sizeVar, VE >, athena::io::BufferYaml< sizeVar, VE >, athena::io::WStringAsString< sizeVar, VE >, athena::io::WString< sizeVar, VE >, athena::io::String< sizeVar, VE >, and athena::io::Buffer< sizeVar, VE >.