2021-10-24 09:04:02 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: Value.hpp
|
|
|
|
Date: 2021-10-24
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Data
|
|
|
|
{
|
|
|
|
struct Value
|
|
|
|
{
|
2022-05-27 17:13:08 +00:00
|
|
|
AU_COPY_MOVE(Value);
|
|
|
|
|
2021-10-24 09:04:02 +00:00
|
|
|
#define CONSTRUCTOR(type, member)\
|
|
|
|
Value(type val)\
|
|
|
|
{\
|
|
|
|
primitive.member = val;\
|
|
|
|
}
|
|
|
|
CONSTRUCTOR(const AuVec3 &, vec3);
|
|
|
|
CONSTRUCTOR(const AuVec4 &, vec4);
|
|
|
|
CONSTRUCTOR(bool, boolean);
|
|
|
|
CONSTRUCTOR(double, number);
|
|
|
|
CONSTRUCTOR(AuInt64, sint);
|
|
|
|
CONSTRUCTOR(AuUInt64, uint);
|
|
|
|
#undef CONSTRUCTOR
|
|
|
|
|
|
|
|
Value(uuids::uuid val)
|
|
|
|
{
|
|
|
|
UUID = val;
|
|
|
|
}
|
|
|
|
|
|
|
|
Value(const AuString &val)
|
|
|
|
{
|
|
|
|
string = val;
|
|
|
|
}
|
|
|
|
|
|
|
|
Value(const char *val)
|
|
|
|
{
|
|
|
|
string = val;
|
|
|
|
}
|
|
|
|
|
|
|
|
Value()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
PrimitiveValue primitive;
|
|
|
|
uuids::uuid UUID;
|
|
|
|
AuString string;
|
|
|
|
};
|
|
|
|
}
|