26 #include <EABase/eabase.h>
33 #define MAX_STRING_SIZE 4096
35 #define UNUSED(var) (void)var;
37 namespace OpenSkyNet {
41 typedef unsigned __int64
uint64;
52 union TaggedUnionData {
53 const void* _constPointer;
57 TaggedUnionData() { memset(
this, 0,
sizeof(TaggedUnionData)); }
69 inline void*
getPointer()
const { assert(_tag ==
POINTER);
return _taggedUnionData._pointer; }
70 inline int getInt()
const { assert(_tag ==
INT);
return _taggedUnionData._int; }
71 inline float getFloat()
const { assert(_tag ==
FLOAT);
return _taggedUnionData._float; }
74 inline void setPointer(
void*
const &pointer_) { assert(_tag ==
POINTER); _taggedUnionData._pointer = pointer_; }
75 inline void setInt(
const int& int_) { assert(_tag ==
INT); _taggedUnionData._int = int_; }
76 inline void setFloat(
const float& float_) { assert(_tag ==
FLOAT); _taggedUnionData._float = float_; }
TaggedUnion(const float &float_)
Definition: UTypes.h:64
int getInt() const
Definition: UTypes.h:70
void setPointer(void *const &pointer_)
Definition: UTypes.h:74
void * getPointer() const
Definition: UTypes.h:69
TaggedUnion(const void *const &pointer_)
Definition: UTypes.h:61
TaggedUnion(void *const &pointer_)
Definition: UTypes.h:62
float getFloat() const
Definition: UTypes.h:71
TAG getTag() const
Definition: UTypes.h:66
TaggedUnion(TAG tag_)
Definition: UTypes.h:60
void setFloat(const float &float_)
Definition: UTypes.h:76
void setInt(const int &int_)
Definition: UTypes.h:75
unsigned long long uint64
Definition: UTypes.h:43
unsigned int uint
Definition: UTypes.h:39
const void * getConstPointer() const
Definition: UTypes.h:68
TaggedUnion(const int &int_)
Definition: UTypes.h:63
void setConstPointer(const void *const &pointer_)
Definition: UTypes.h:73
TAG
Definition: UTypes.h:48