Jameo Core Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
jm::Variant Struct Reference

Public Member Functions

 Variant ()
 
 Variant (const Variant &another)
 
Variantoperator= (const Variant &another)
 
 Variant (int64 number)
 
 Variant (double number)
 
 Variant (const jm::String &string)
 
int64 toInt64 () const
 
int32 toInt32 () const
 
double toDouble () const
 
const StringtoString () const
 

Public Attributes

PropertyType mType
 Type of Property.
 
union { 
 
   bool   boolValue 
 
   uint64   uintValue 
 
   int64   intValue 
 
   float   floatValue 
 
   double   doubleValue 
 
mNumberValue 
 The value of the property is usually set by the user in the GUI. Therefore, the value is typically a string, boolean, or number. If there is another type of value, it is wise to consider whether the transfer should be done as a text or if it should be extended here. However, it is always better to parse it as a text. As mentioned, it comes from the interface and not from other data.
 
String mTextValue
 

Constructor & Destructor Documentation

◆ Variant() [1/5]

jm::Variant::Variant ( )

◆ Variant() [2/5]

jm::Variant::Variant ( const Variant another)

◆ Variant() [3/5]

jm::Variant::Variant ( int64  number)
explicit

◆ Variant() [4/5]

jm::Variant::Variant ( double  number)
explicit

◆ Variant() [5/5]

jm::Variant::Variant ( const jm::String string)
explicit

Member Function Documentation

◆ operator=()

Variant & jm::Variant::operator= ( const Variant another)

◆ toDouble()

double jm::Variant::toDouble ( ) const

◆ toInt32()

int32 jm::Variant::toInt32 ( ) const

◆ toInt64()

int64 jm::Variant::toInt64 ( ) const

◆ toString()

const String & jm::Variant::toString ( ) const

Member Data Documentation

◆ boolValue

bool jm::Variant::boolValue

◆ doubleValue

double jm::Variant::doubleValue

◆ floatValue

float jm::Variant::floatValue

◆ intValue

int64 jm::Variant::intValue

◆ [union]

union { ... } jm::Variant::mNumberValue

The value of the property is usually set by the user in the GUI. Therefore, the value is typically a string, boolean, or number. If there is another type of value, it is wise to consider whether the transfer should be done as a text or if it should be extended here. However, it is always better to parse it as a text. As mentioned, it comes from the interface and not from other data.

◆ mTextValue

String jm::Variant::mTextValue

◆ mType

PropertyType jm::Variant::mType

Type of Property.

◆ uintValue

uint64 jm::Variant::uintValue