init
This commit is contained in:
1 parent
fb28e1236d
commit
6673ca3fc2
7 files changed
+449
No files matched your search
@@ -0,0 +1,37 @@
|
||||
module otya.smilebasic.type;
|
||||
enum ValueType : byte
|
||||
{
|
||||
Integer,
|
||||
Double,
|
||||
String,
|
||||
Array,
|
||||
IntegerArray,
|
||||
DoubleArray,
|
||||
StringArray,
|
||||
}
|
||||
struct Value
|
||||
{
|
||||
ValueType type;
|
||||
union
|
||||
{
|
||||
int integerValue;
|
||||
double doubleValue;
|
||||
wstring stringValue;
|
||||
int[] intArray;
|
||||
}
|
||||
this(int value)
|
||||
{
|
||||
this.type = ValueType.Integer;
|
||||
integerValue = value;
|
||||
}
|
||||
this(double value)
|
||||
{
|
||||
this.type = ValueType.Double;
|
||||
doubleValue = value;
|
||||
}
|
||||
this(wstring value)
|
||||
{
|
||||
this.type = ValueType.String;
|
||||
stringValue = value;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user