MaterialX 1.38.9
Loading...
Searching...
No Matches
ScalarTypeSyntax Class Reference

Specialization of TypeSyntax for scalar types. More...

#include <Syntax.h>

Inheritance diagram for ScalarTypeSyntax:
TypeSyntax StringTypeSyntax

Public Member Functions

 ScalarTypeSyntax (const string &name, const string &defaultValue, const string &uniformDefaultValue, const string &typeAlias=EMPTY_STRING, const string &typeDefinition=EMPTY_STRING)
 
string getValue (const Value &value, bool uniform) const override
 Returns a value formatted according to this type syntax. More...
 
string getValue (const StringVec &values, bool uniform) const override
 Returns a value formatted according to this type syntax. More...
 
- Public Member Functions inherited from TypeSyntax
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 StringVecgetMembers () 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...
 
virtual string getValue (const StringVec &values, bool uniform) const =0
 Returns a value formatted according to this type syntax. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TypeSyntax
 TypeSyntax (const string &name, const string &defaultValue, const string &uniformDefaultValue, const string &typeAlias, const string &typeDefinition, const StringVec &members)
 Protected constructor.
 
- Protected Attributes inherited from TypeSyntax
string _name
 
string _defaultValue
 
string _uniformDefaultValue
 
string _typeAlias
 
string _typeDefinition
 
StringVec _members
 
- Static Protected Attributes inherited from TypeSyntax
static const StringVec EMPTY_MEMBERS
 

Detailed Description

Specialization of TypeSyntax for scalar types.

Member Function Documentation

◆ getValue() [1/2]

string getValue ( const StringVec values,
bool  uniform 
) const
overridevirtual

Returns a value formatted according to this type syntax.

The value is constructed from the given list of value entries with one entry for each member of the type.

Implements TypeSyntax.

◆ getValue() [2/2]

string getValue ( const Value value,
bool  uniform 
) const
overridevirtual

Returns a value formatted according to this type syntax.

The value is constructed from the given value object.

Implements TypeSyntax.

Reimplemented in StringTypeSyntax.


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