MaterialX 1.39.1
|
Base class for syntax handling of types. More...
#include <Syntax.h>
Public Member Functions | |
const string & | getName () const |
Returns the type name. | |
const string & | getTypeAlias () const |
Returns a type alias if needed to define the type in the target language. | |
const string & | getTypeDefinition () const |
Returns a type definition if needed to define the type in the target language. | |
const string & | getDefaultValue (bool uniform) const |
Returns the default value for this type. | |
const StringVec & | getMembers () const |
Returns the syntax for accessing type members if the type can be swizzled. | |
virtual string | getValue (const ShaderPort *port, bool uniform) const |
Returns a value formatted according to this type syntax. More... | |
virtual string | getValue (const Value &value, bool uniform) const =0 |
Returns a value formatted according to this type syntax. More... | |
Protected Member Functions | |
TypeSyntax (const string &name, const string &defaultValue, const string &uniformDefaultValue, const string &typeAlias, const string &typeDefinition, const StringVec &members) | |
Protected constructor. | |
Protected Attributes | |
string | _name |
string | _defaultValue |
string | _uniformDefaultValue |
string | _typeAlias |
string | _typeDefinition |
StringVec | _members |
Static Protected Attributes | |
static const StringVec | EMPTY_MEMBERS |
Base class for syntax handling of types.
|
virtual |
Returns a value formatted according to this type syntax.
The value is constructed from the given shader port object.
|
pure virtual |
Returns a value formatted according to this type syntax.
The value is constructed from the given value object.
Implemented in ScalarTypeSyntax, StringTypeSyntax, and AggregateTypeSyntax.