Tramway SDK
Public Member Functions | Protected Attributes | Friends | List of all members
tram::Value Class Reference

Generic, type-safe union. More...

#include <value.h>

Public Member Functions

 Value ()
 
 ~Value ()
 
 Value (const Value &other)
 
Valueoperator= (const Value &other)
 
bool operator== (const Value &other) const
 
 Value (bool value)
 
 Value (name_t value)
 
 Value (const char *value)
 
 Value (int8_t value)
 
 Value (int16_t value)
 
 Value (int32_t value)
 
 Value (int64_t value)
 
 Value (uint8_t value)
 
 Value (uint16_t value)
 
 Value (uint32_t value)
 
 Value (uint64_t value)
 
 Value (vec2 value)
 
 Value (vec3 value)
 
 Value (vec4 value)
 
 Value (quat value)
 
 Value (float value)
 
 Value (double value)
 
 operator bool () const
 
 operator name_t () const
 
 operator const char * () const
 
 operator int8_t () const
 
 operator int16_t () const
 
 operator int32_t () const
 
 operator int64_t () const
 
 operator uint8_t () const
 
 operator uint16_t () const
 
 operator uint32_t () const
 
 operator uint64_t () const
 
 operator float () const
 
 operator double () const
 
 operator vec2 () const
 
 operator vec3 () const
 
 operator vec4 () const
 
 operator quat () const
 
bool IsBool () const
 
bool IsInt () const
 
bool IsFloat () const
 
int GetInt () const
 
float GetFloat () const
 
Type GetType () const
 

Protected Attributes

Type type
 
union {
   bool   bool_value
 
   name_t   name_value
 
   const char *   string_value
 
   int8_t   int8_value
 
   int16_t   int16_value
 
   int32_t   int32_value
 
   int64_t   int64_value
 
   uint8_t   uint8_value
 
   uint16_t   uint16_value
 
   uint32_t   uint32_value
 
   uint64_t   uint64_value
 
   float   float_value
 
   double   double_value
 
   vec2   vec2_value
 
   vec3   vec3_value
 
   vec4   vec4_value
 
   quat   quat_value
 
}; 
 

Friends

class ValuePtr
 

Detailed Description

Generic, type-safe union.

Constructor & Destructor Documentation

◆ Value() [1/19]

tram::Value::Value ( )
inline

◆ ~Value()

tram::Value::~Value ( )
inline

◆ Value() [2/19]

tram::Value::Value ( const Value other)
inline

◆ Value() [3/19]

tram::Value::Value ( bool  value)
inline

◆ Value() [4/19]

tram::Value::Value ( name_t  value)
inline

◆ Value() [5/19]

tram::Value::Value ( const char *  value)
inline

◆ Value() [6/19]

tram::Value::Value ( int8_t  value)
inline

◆ Value() [7/19]

tram::Value::Value ( int16_t  value)
inline

◆ Value() [8/19]

tram::Value::Value ( int32_t  value)
inline

◆ Value() [9/19]

tram::Value::Value ( int64_t  value)
inline

◆ Value() [10/19]

tram::Value::Value ( uint8_t  value)
inline

◆ Value() [11/19]

tram::Value::Value ( uint16_t  value)
inline

◆ Value() [12/19]

tram::Value::Value ( uint32_t  value)
inline

◆ Value() [13/19]

tram::Value::Value ( uint64_t  value)
inline

◆ Value() [14/19]

tram::Value::Value ( vec2  value)
inline

◆ Value() [15/19]

tram::Value::Value ( vec3  value)
inline

◆ Value() [16/19]

tram::Value::Value ( vec4  value)
inline

◆ Value() [17/19]

tram::Value::Value ( quat  value)
inline

◆ Value() [18/19]

tram::Value::Value ( float  value)
inline

◆ Value() [19/19]

tram::Value::Value ( double  value)
inline

Member Function Documentation

◆ GetFloat()

float tram::Value::GetFloat ( ) const
inline

◆ GetInt()

int tram::Value::GetInt ( ) const
inline

◆ GetType()

Type tram::Value::GetType ( ) const
inline

◆ IsBool()

bool tram::Value::IsBool ( ) const
inline

◆ IsFloat()

bool tram::Value::IsFloat ( ) const
inline

◆ IsInt()

bool tram::Value::IsInt ( ) const
inline

◆ operator bool()

tram::Value::operator bool ( ) const
inline

◆ operator const char *()

tram::Value::operator const char * ( ) const
inline

◆ operator double()

tram::Value::operator double ( ) const
inline

◆ operator float()

tram::Value::operator float ( ) const
inline

◆ operator int16_t()

tram::Value::operator int16_t ( ) const
inline

◆ operator int32_t()

tram::Value::operator int32_t ( ) const
inline

◆ operator int64_t()

tram::Value::operator int64_t ( ) const
inline

◆ operator int8_t()

tram::Value::operator int8_t ( ) const
inline

◆ operator name_t()

tram::Value::operator name_t ( ) const
inline

◆ operator quat()

tram::Value::operator quat ( ) const
inline

◆ operator uint16_t()

tram::Value::operator uint16_t ( ) const
inline

◆ operator uint32_t()

tram::Value::operator uint32_t ( ) const
inline

◆ operator uint64_t()

tram::Value::operator uint64_t ( ) const
inline

◆ operator uint8_t()

tram::Value::operator uint8_t ( ) const
inline

◆ operator vec2()

tram::Value::operator vec2 ( ) const
inline

◆ operator vec3()

tram::Value::operator vec3 ( ) const
inline

◆ operator vec4()

tram::Value::operator vec4 ( ) const
inline

◆ operator=()

Value & tram::Value::operator= ( const Value other)
inline

◆ operator==()

bool tram::Value::operator== ( const Value other) const
inline

Friends And Related Function Documentation

◆ ValuePtr

friend class ValuePtr
friend

Member Data Documentation

◆ 

union { ... } tram::Value::@30

◆ bool_value

bool tram::Value::bool_value

◆ double_value

double tram::Value::double_value

◆ float_value

float tram::Value::float_value

◆ int16_value

int16_t tram::Value::int16_value

◆ int32_value

int32_t tram::Value::int32_value

◆ int64_value

int64_t tram::Value::int64_value

◆ int8_value

int8_t tram::Value::int8_value

◆ name_value

name_t tram::Value::name_value

◆ quat_value

quat tram::Value::quat_value

◆ string_value

const char* tram::Value::string_value

◆ type

Type tram::Value::type
protected

◆ uint16_value

uint16_t tram::Value::uint16_value

◆ uint32_value

uint32_t tram::Value::uint32_value

◆ uint64_value

uint64_t tram::Value::uint64_value

◆ uint8_value

uint8_t tram::Value::uint8_value

◆ vec2_value

vec2 tram::Value::vec2_value

◆ vec3_value

vec3 tram::Value::vec3_value

◆ vec4_value

vec4 tram::Value::vec4_value

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