HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AggregateValue Class Reference

A subclass for aggregate values with multiple members. More...

#include <Value.h>

+ Inheritance diagram for AggregateValue:

Public Member Functions

 AggregateValue (const string &typeName)
 
virtual ~AggregateValue ()
 
ValuePtr copy () const override
 Create a deep copy of the value. More...
 
void appendValue (ConstValuePtr valuePtr)
 Append a member value to the aggregate. More...
 
const vector< ConstValuePtr > & getMembers () const
 
ConstValuePtr getMemberValue (size_t index) const
 Query an indexed member value from the aggregate. More...
 
const stringgetTypeString () const override
 Return type string. More...
 
string getValueString () const override
 Return value string. More...
 
- Public Member Functions inherited from Value
 Value ()
 
virtual ~Value ()
 
template<class T >
bool isA () const
 Return true if this value is of the given type. More...
 
template<class T >
const TasA () const
 

Static Public Member Functions

static AggregateValuePtr createAggregateValue (const string &typeName)
 Create a new value from an object of any valid MaterialX type. More...
 
static AggregateValuePtr createAggregateValueFromString (const string &value, const string &type, ConstTypeDefPtr typeDefPtr)
 
- Static Public Member Functions inherited from Value
template<class T >
static ValuePtr createValue (const T &data)
 Create a new value from an object of any valid MaterialX type. More...
 
static ValuePtr createValue (const char *data)
 
static ValuePtr createValueFromStrings (const string &value, const string &type, ConstTypeDefPtr typeDef=nullptr)
 
static void setFloatFormat (FloatFormat format)
 
static void setFloatPrecision (int precision)
 Set float precision for converting values to strings. More...
 
static FloatFormat getFloatFormat ()
 Return the current float format. More...
 
static int getFloatPrecision ()
 Return the current float precision. More...
 

Additional Inherited Members

- Public Types inherited from Value
enum  FloatFormat { FloatFormatDefault = 0, FloatFormatFixed = 1, FloatFormatScientific = 2 }
 Float formats to use when converting values to strings. More...
 
- Protected Types inherited from Value
using CreatorFunction = ValuePtr(*)(const string &)
 Return true if this value is of the given type. More...
 
using CreatorMap = std::unordered_map< string, CreatorFunction >
 Return true if this value is of the given type. More...
 

Detailed Description

A subclass for aggregate values with multiple members.

Definition at line 198 of file Value.h.

Constructor & Destructor Documentation

AggregateValue::AggregateValue ( const string typeName)
inline

Definition at line 201 of file Value.h.

virtual AggregateValue::~AggregateValue ( )
inlinevirtual

Definition at line 205 of file Value.h.

Member Function Documentation

void AggregateValue::appendValue ( ConstValuePtr  valuePtr)
inline

Append a member value to the aggregate.

Definition at line 219 of file Value.h.

ValuePtr AggregateValue::copy ( ) const
inlineoverridevirtual

Create a deep copy of the value.

Implements Value.

Definition at line 208 of file Value.h.

static AggregateValuePtr AggregateValue::createAggregateValue ( const string typeName)
inlinestatic

Create a new value from an object of any valid MaterialX type.

Definition at line 246 of file Value.h.

static AggregateValuePtr AggregateValue::createAggregateValueFromString ( const string value,
const string type,
ConstTypeDefPtr  typeDefPtr 
)
static
const vector<ConstValuePtr>& AggregateValue::getMembers ( ) const
inline

Definition at line 224 of file Value.h.

ConstValuePtr AggregateValue::getMemberValue ( size_t  index) const
inline

Query an indexed member value from the aggregate.

Definition at line 230 of file Value.h.

const string& AggregateValue::getTypeString ( ) const
inlineoverridevirtual

Return type string.

Implements Value.

Definition at line 236 of file Value.h.

string AggregateValue::getValueString ( ) const
overridevirtual

Return value string.

Implements Value.


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