2016-03-04 23:00:12 +00:00
|
|
|
#include <athena/DNAYaml.hpp>
|
2015-08-03 01:42:47 +00:00
|
|
|
|
2016-03-04 23:00:12 +00:00
|
|
|
using namespace athena;
|
2018-02-18 09:50:24 +00:00
|
|
|
typedef io::DNA<Big> BigDNA;
|
2015-08-03 01:42:47 +00:00
|
|
|
|
2018-02-22 07:18:59 +00:00
|
|
|
enum ETest : atUint8
|
|
|
|
{
|
|
|
|
ZERO,
|
|
|
|
ONE,
|
|
|
|
TWO,
|
|
|
|
THREE
|
|
|
|
};
|
|
|
|
|
|
|
|
template <ETest EVal>
|
|
|
|
struct AT_SPECIALIZE_PARMS(ETest::ZERO, ETest::ONE, ETest::TWO, ETest::THREE)
|
|
|
|
TESTSubFile : public BigDNA
|
2015-08-03 01:42:47 +00:00
|
|
|
{
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_DECL_DNA
|
2018-02-22 07:18:59 +00:00
|
|
|
Value<ETest> varE = EVal;
|
2015-08-03 01:42:47 +00:00
|
|
|
Value<atUint32> sub1;
|
|
|
|
Value<atUint32> sub2;
|
|
|
|
};
|
|
|
|
|
2018-02-22 07:18:59 +00:00
|
|
|
struct TESTSubClassFile : public TESTSubFile<ETest::ONE>
|
2015-08-03 01:42:47 +00:00
|
|
|
{
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-03 01:42:47 +00:00
|
|
|
Value<atUint32> sub3;
|
2018-02-22 07:18:59 +00:00
|
|
|
Value<atUint16> sub4;
|
2015-08-03 01:42:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct TESTSubSubClassFile : public TESTSubClassFile
|
|
|
|
{
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-03 01:42:47 +00:00
|
|
|
Value<atUint32> sub5;
|
|
|
|
Value<atUint32> sub6;
|
|
|
|
};
|
|
|
|
|
2018-02-22 07:18:59 +00:00
|
|
|
template <class Var32Tp, int Var32Val>
|
|
|
|
struct AT_SPECIALIZE_PARMS(atUint16, 42, atUint32, 87, atUint32, 2)
|
|
|
|
TESTFile : public BigDNA
|
2015-08-03 01:42:47 +00:00
|
|
|
{
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-03 01:42:47 +00:00
|
|
|
Value<bool> varBool;
|
2018-02-22 07:18:59 +00:00
|
|
|
AT_OVERRIDE_RCRC32(12345678) Value<Var32Tp> x4_var32 = Var32Val;
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_OVERRIDE_RCRC32(deadbabe) Value<atUint16> x8_var16;
|
2015-08-03 01:42:47 +00:00
|
|
|
Value<atVec3f> vec3;
|
|
|
|
Value<atVec4f> vec4;
|
|
|
|
|
|
|
|
struct TESTNestedSubFile : public BigDNA
|
|
|
|
{
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_DECL_DNA
|
2015-08-03 01:42:47 +00:00
|
|
|
Value<atUint32> nestSub1;
|
|
|
|
Value<atUint32> nestSub2;
|
|
|
|
} nestedSubFile;
|
|
|
|
|
2018-02-22 07:18:59 +00:00
|
|
|
using TESTSubFileUsing = TESTSubFile<ETest::TWO>;
|
2015-08-14 02:58:04 +00:00
|
|
|
TESTSubFileUsing subFile;
|
2015-08-03 01:42:47 +00:00
|
|
|
|
|
|
|
Align<4> align;
|
|
|
|
|
2018-02-22 07:18:59 +00:00
|
|
|
template <class NestedTp, int NestedVal>
|
|
|
|
struct AT_SPECIALIZE_PARMS(atInt32, 36, atInt64, 96)
|
|
|
|
TESTTemplateSubFile : public BigDNA
|
2015-08-03 01:42:47 +00:00
|
|
|
{
|
2018-02-18 09:50:24 +00:00
|
|
|
AT_DECL_DNA
|
2018-02-22 07:18:59 +00:00
|
|
|
Value<NestedTp> explSub1 = NestedVal;
|
|
|
|
Value<Var32Tp> explSub2 = Var32Val;
|
|
|
|
};
|
|
|
|
TESTTemplateSubFile<atInt32, 36> nestedTemplate1;
|
|
|
|
TESTTemplateSubFile<atInt64, 96> nestedTemplate2;
|
2015-08-03 01:42:47 +00:00
|
|
|
|
2018-02-18 09:50:24 +00:00
|
|
|
Value<atUint32, Little> arrCount[2];
|
2015-08-03 01:42:47 +00:00
|
|
|
Vector<atUint32, DNA_COUNT(arrCount[0])> array;
|
|
|
|
|
2018-02-22 07:18:59 +00:00
|
|
|
Value<atUint32> arrAltCount;
|
|
|
|
Vector<atUint32, DNA_COUNT(arrAltCount)> arrayAlt;
|
|
|
|
|
2015-08-03 01:42:47 +00:00
|
|
|
Seek<21, Current> seek;
|
|
|
|
|
|
|
|
Value<atUint32> arrCount2;
|
2018-02-22 07:18:59 +00:00
|
|
|
Vector<TESTSubFile<ETest::ZERO>, DNA_COUNT(arrCount[1] + arrCount2)> array2;
|
2015-08-03 01:42:47 +00:00
|
|
|
|
|
|
|
Value<atUint32> bufSz;
|
|
|
|
Buffer<DNA_COUNT(bufSz)> buf;
|
|
|
|
|
|
|
|
String<32> str;
|
|
|
|
WString<64> wstr;
|
|
|
|
};
|
|
|
|
|