C++ API
Loading...
Searching...
No Matches
Plux::Variant Class Reference

This class encapsulates a value of one of following data types: bool, int, float and String. More...

#include <plux.h>

Public Types

enum  Type {
  TypeNone , TypeBool , TypeInt , TypeFloat ,
  TypeString
}
 Data type enumeration. More...
 

Public Member Functions

 Variant (void)
 Constructs an empty Variant.
 
 Variant (bool _b)
 Constructs a Variant with a bool value.
 
 Variant (int _i)
 Constructs a Variant with an int value.
 
 Variant (float _f)
 Constructs a Variant with a float value.
 
 Variant (const char *_s)
 Constructs a Variant with a String value from a const char*.
 
 Variant (const String &_s)
 Constructs a Variant with a String value.
 
 Variant (const Variant &v)
 Constructs a Variant as a copy of another Variant.
 

Public Attributes

const Type type
 Data type.
 
union { 
 
   bool   b 
 
   int   i 
 
   float   f 
 
   String *   s 
 
};  
 Data value.
 

Detailed Description

This class encapsulates a value of one of following data types: bool, int, float and String.

See also
Properties

Member Enumeration Documentation

◆ Type

Data type enumeration.

Enumerator
TypeNone 

No data.

TypeBool 

bool data type

TypeInt 

int data type

TypeFloat 

float data type

TypeString 

String data type


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