Athena IO Library
athena::io::DNA< DNAE > Struct Template Referenceabstract

Base DNA class used against 'atdna'. More...

#include <DNA.hpp>

Inheritance diagram for athena::io::DNA< DNAE >:
Inheritance graph
Collaboration diagram for athena::io::DNA< DNAE >:
Collaboration graph

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...
 

Detailed Description

template<Endian DNAE>
struct athena::io::DNA< DNAE >

Base DNA class used against 'atdna'.

Template Parameters
DNAEDefault-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

Definition at line 45 of file DNA.hpp.

Member Typedef Documentation

template<Endian DNAE>
template<size_t sizeVar>
using athena::io::DNA< DNAE >::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.

Template Parameters
sizeVarC++ expression wrapped in DNA_COUNT macro to determine number of bytes for buffer

Definition at line 87 of file DNA.hpp.

template<Endian DNAE>
template<atInt32 sizeVar = -1>
using athena::io::DNA< DNAE >::String = struct athena::io::String<sizeVar, DNAE>

Template type wrapping std::string and signaling atdna to read string data where it's used.

Template Parameters
sizeVarC++ expression wrapped in DNA_COUNT macro to determine number of characters for string -1 literal indicates null-terminated string

Definition at line 95 of file DNA.hpp.

template<Endian DNAE>
template<typename T , Endian VE = DNAE>
using athena::io::DNA< DNAE >::Value = T

Template type signaling atdna to capture the value where it's used.

Template Parameters
TThe type of the value. Can be any numeric type or atVec* type
VEEndianness of the value

Definition at line 70 of file DNA.hpp.

template<Endian DNAE>
template<typename T , size_t cntVar, Endian VE = DNAE>
using athena::io::DNA< DNAE >::Vector = std::vector<T>

Template type wrapping std::vector and signaling atdna to manipulate it where it's used.

Template Parameters
TThe type of contained elements. Can be any numeric type, atVec* type, or another DNA subclass
cntVarC++ expression wrapped in DNA_COUNT macro to determine number of elements for vector
VEEndianness of the contained values

Definition at line 79 of file DNA.hpp.

template<Endian DNAE>
template<atInt32 sizeVar = -1, Endian VE = DNAE>
using athena::io::DNA< DNAE >::WString = struct athena::io::WString<sizeVar, VE>

Template type wrapping std::wstring and signaling atdna to read wstring data where it's used.

Template Parameters
sizeVarC++ expression wrapped in DNA_COUNT macro to determine number of characters for wstring -1 literal indicates null-terminated wstring

Definition at line 103 of file DNA.hpp.

template<Endian DNAE>
template<atInt32 sizeVar = -1>
using athena::io::DNA< DNAE >::WStringAsString = struct athena::io::WStringAsString<sizeVar, DNAE>

Template type wrapping std::string and signaling atdna to read wstring data where it's used.

Template Parameters
sizeVarC++ expression wrapped in DNA_COUNT macro to determine number of characters for string -1 literal indicates null-terminated string

Definition at line 111 of file DNA.hpp.

Member Function Documentation

template<Endian DNAE>
template<typename T >
static size_t athena::io::DNA< DNAE >::__EnumerateSize ( size_t  __isz,
const T &  v 
)
inlinestatic

Internal DNA helper for accumulating binarySize.

Parameters
__iszinitial size value
vVector to enumerate
Returns
Cumulative total

Definition at line 140 of file DNA.hpp.

template<Endian DNAE>
virtual size_t athena::io::DNA< DNAE >::binarySize ( size_t  __isz) const
pure virtual

The documentation for this struct was generated from the following file: