LuxCore  2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
luxrays::PropertyValue Class Reference

Value that can be stored in a Property. More...

#include <properties.h>

Collaboration diagram for luxrays::PropertyValue:

Public Types

enum  DataType {
  NONE_VAL, BOOL_VAL, INT_VAL, UINT_VAL,
  FLOAT_VAL, DOUBLE_VAL, ULONGLONG_VAL, STRING_VAL,
  BLOB_VAL
}
 

Public Member Functions

 PropertyValue ()
 
 PropertyValue (const PropertyValue &propVal)
 
 PropertyValue (const bool val)
 
 PropertyValue (const int val)
 
 PropertyValue (const unsigned int val)
 
 PropertyValue (const float val)
 
 PropertyValue (const double val)
 
 PropertyValue (const unsigned long long val)
 
 PropertyValue (const std::string &val)
 
 PropertyValue (const Blob &val)
 
 ~PropertyValue ()
 
template<class T >
Get () const
 
DataType GetValueType () const
 
PropertyValueoperator= (const PropertyValue &propVal)
 
template<>
CPP_API bool Get () const
 
template<>
CPP_API int Get () const
 
template<>
CPP_API unsigned int Get () const
 
template<>
CPP_API float Get () const
 
template<>
CPP_API double Get () const
 
template<>
CPP_API unsigned long long Get () const
 
template<>
CPP_API const BlobGet () const
 

Static Private Member Functions

static void Copy (const PropertyValue &prop0Val, PropertyValue &prop1Val)
 

Private Attributes

DataType dataType
 
union {
   bool   boolVal
 
   int   intVal
 
   unsigned int   uintVal
 
   float   floatVal
 
   double   doubleVal
 
   unsigned long long   ulonglongVal
 
   std::string *   stringVal
 
   Blob *   blobVal
 
data
 

Detailed Description

Value that can be stored in a Property.

The current list of allowed data types is:

  • bool
  • int
  • unsigned int
  • float
  • double
  • unsigned long long
  • string
  • Blob

Definition at line 82 of file properties.h.

Member Enumeration Documentation

Enumerator
NONE_VAL 
BOOL_VAL 
INT_VAL 
UINT_VAL 
FLOAT_VAL 
DOUBLE_VAL 
ULONGLONG_VAL 
STRING_VAL 
BLOB_VAL 

Definition at line 84 of file properties.h.

Constructor & Destructor Documentation

luxrays::PropertyValue::PropertyValue ( )
luxrays::PropertyValue::PropertyValue ( const PropertyValue propVal)
luxrays::PropertyValue::PropertyValue ( const bool  val)
luxrays::PropertyValue::PropertyValue ( const int  val)
luxrays::PropertyValue::PropertyValue ( const unsigned int  val)
luxrays::PropertyValue::PropertyValue ( const float  val)
luxrays::PropertyValue::PropertyValue ( const double  val)
luxrays::PropertyValue::PropertyValue ( const unsigned long long  val)
luxrays::PropertyValue::PropertyValue ( const std::string &  val)
luxrays::PropertyValue::PropertyValue ( const Blob val)
luxrays::PropertyValue::~PropertyValue ( )

Member Function Documentation

static void luxrays::PropertyValue::Copy ( const PropertyValue prop0Val,
PropertyValue prop1Val 
)
staticprivate
template<class T >
T luxrays::PropertyValue::Get ( ) const
template<>
CPP_API bool luxrays::PropertyValue::Get ( ) const
template<>
CPP_API int luxrays::PropertyValue::Get ( ) const
template<>
CPP_API unsigned int luxrays::PropertyValue::Get ( ) const
template<>
CPP_API float luxrays::PropertyValue::Get ( ) const
template<>
CPP_API double luxrays::PropertyValue::Get ( ) const
template<>
CPP_API unsigned long long luxrays::PropertyValue::Get ( ) const
template<>
CPP_API const Blob& luxrays::PropertyValue::Get ( ) const
DataType luxrays::PropertyValue::GetValueType ( ) const
PropertyValue& luxrays::PropertyValue::operator= ( const PropertyValue propVal)

Member Data Documentation

Blob* luxrays::PropertyValue::blobVal

Definition at line 127 of file properties.h.

bool luxrays::PropertyValue::boolVal

Definition at line 120 of file properties.h.

union { ... } luxrays::PropertyValue::data
DataType luxrays::PropertyValue::dataType
private

Definition at line 117 of file properties.h.

double luxrays::PropertyValue::doubleVal

Definition at line 124 of file properties.h.

float luxrays::PropertyValue::floatVal

Definition at line 123 of file properties.h.

int luxrays::PropertyValue::intVal

Definition at line 121 of file properties.h.

std::string* luxrays::PropertyValue::stringVal

Definition at line 126 of file properties.h.

unsigned int luxrays::PropertyValue::uintVal

Definition at line 122 of file properties.h.

unsigned long long luxrays::PropertyValue::ulonglongVal

Definition at line 125 of file properties.h.


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