HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Value.h File Reference
+ Include dependency graph for Value.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TypedValue< T >
 The class template for typed subclasses of Value. More...
 
class  Value
 A generic, discriminated value, whose type may be queried dynamically. More...
 
class  TypedValue< T >
 The class template for typed subclasses of Value. More...
 
class  AggregateValue
 A subclass for aggregate values with multiple members. More...
 
class  ScopedFloatFormatting
 

Typedefs

using IntVec = vector< int >
 A vector of integers. More...
 
using BoolVec = vector< bool >
 A vector of booleans. More...
 
using FloatVec = vector< float >
 A vector of floats. More...
 
using ValuePtr = shared_ptr< Value >
 A shared pointer to a Value. More...
 
using ConstValuePtr = shared_ptr< const Value >
 A shared pointer to a const Value. More...
 
using AggregateValuePtr = shared_ptr< AggregateValue >
 A shared pointer to an Aggregate Value. More...
 
using ConstAggregateValuePtr = shared_ptr< const AggregateValue >
 A shared pointer to a const Aggregate Value. More...
 
using ConstTypeDefPtr = shared_ptr< const TypeDef >
 

Functions

template<class T >
MX_CORE_API const stringgetTypeString ()
 Return the type string associated with the given data type. More...
 
template<class T >
MX_CORE_API string toValueString (const T &data)
 Convert the given data value to a value string. More...
 
template<class T >
MX_CORE_APIfromValueString (const string &value)
 
MX_CORE_API StringVec parseStructValueString (const string &value)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< int >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< bool >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< float >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Color3 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Color4 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Vector2 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Vector3 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Vector4 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Matrix33 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< Matrix44 >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< string >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< IntVec >)
 Array types. More...
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< BoolVec >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< FloatVec >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< StringVec >)
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< long >)
 Alias types. More...
 
 MX_CORE_EXTERN_TEMPLATE (TypedValue< double >)
 

Detailed Description

Generic value classes

Definition in file Value.h.

Typedef Documentation

using AggregateValuePtr = shared_ptr<AggregateValue>

A shared pointer to an Aggregate Value.

Definition at line 35 of file Value.h.

using BoolVec = vector<bool>

A vector of booleans.

Definition at line 22 of file Value.h.

using ConstAggregateValuePtr = shared_ptr<const AggregateValue>

A shared pointer to a const Aggregate Value.

Definition at line 37 of file Value.h.

using ConstTypeDefPtr = shared_ptr<const TypeDef>

Definition at line 40 of file Value.h.

using ConstValuePtr = shared_ptr<const Value>

A shared pointer to a const Value.

Definition at line 32 of file Value.h.

using FloatVec = vector<float>

A vector of floats.

Definition at line 24 of file Value.h.

using IntVec = vector<int>

A vector of integers.

Definition at line 20 of file Value.h.

using ValuePtr = shared_ptr<Value>

A shared pointer to a Value.

Definition at line 30 of file Value.h.

Function Documentation

template<class T >
MX_CORE_API T fromValueString ( const string value)

Convert the given value string to a data value of the given type.

Exceptions
ExceptionTypeErrorif the conversion cannot be performed.
template<class T >
MX_CORE_API const string& getTypeString ( )

Return the type string associated with the given data type.

MX_CORE_EXTERN_TEMPLATE ( TypedValue< int )

Forward declaration of specific template instantiations. Base types

MX_CORE_EXTERN_TEMPLATE ( TypedValue< bool >  )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< float )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Color3 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Color4 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Vector2 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Vector3 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Vector4 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Matrix33 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< Matrix44 )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< string )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< IntVec )

Array types.

MX_CORE_EXTERN_TEMPLATE ( TypedValue< BoolVec )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< FloatVec )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< StringVec )
MX_CORE_EXTERN_TEMPLATE ( TypedValue< long >  )

Alias types.

MX_CORE_EXTERN_TEMPLATE ( TypedValue< double >  )
MX_CORE_API StringVec parseStructValueString ( const string value)

Tokenize the string representation of a struct value i.e, "{1;2;3}" into a vector of substrings. Note: "{1;2;{3;4;5}}" will be split in to ["1", "2", "{3;4;5}"]

template<class T >
MX_CORE_API string toValueString ( const T &  data)

Convert the given data value to a value string.