MaterialX 1.39.2
|
A subclass for aggregate values with multiple members. More...
#include <Value.h>
Public Member Functions | |
AggregateValue (const string &typeName) | |
ValuePtr | copy () const override |
Create a deep copy of the value. | |
void | appendValue (ConstValuePtr valuePtr) |
Append a member value to the aggregate. | |
const vector< ConstValuePtr > & | getMembers () const |
ConstValuePtr | getMemberValue (size_t index) const |
Query an indexed member value from the aggregate. | |
const string & | getTypeString () const override |
Return type string. | |
string | getValueString () const override |
Return value string. | |
template<class T> | |
bool | isA () const |
Return true if this value is of the given type. | |
template<class T> | |
const T & | asA () const |
Return our underlying data as an object of the given type. | |
Static Public Member Functions | |
static AggregateValuePtr | createAggregateValue (const string &typeName) |
Create a new value from an object of any valid MaterialX type. | |
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. | |
static ValuePtr | createValue (const char *data) |
static ValuePtr | createValueFromStrings (const string &value, const string &type, ConstTypeDefPtr typeDef=nullptr) |
Create a new value instance from value and type strings. | |
static void | setFloatFormat (FloatFormat format) |
Set float formatting for converting values to strings. | |
static void | setFloatPrecision (int precision) |
Set float precision for converting values to strings. | |
static FloatFormat | getFloatFormat () |
Return the current float format. | |
static int | getFloatPrecision () |
Return the current float precision. | |
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. | |
using | CreatorFunction = ValuePtr (*)(const string&) |
using | CreatorMap = std::unordered_map<string, CreatorFunction> |
A subclass for aggregate values with multiple members.
|
inlineoverridevirtual |
Return type string.
Implements Value.
|
overridevirtual |
Return value string.
Implements Value.