MaterialX 1.39.2
Loading...
Searching...
No Matches
TypeDesc.h File Reference

Type descriptor for a MaterialX data type. More...

#include <MaterialXGenShader/Export.h>
#include <MaterialXCore/Value.h>
#include <string_view>

Go to the source code of this file.

Classes

class  TypeDesc
 A type descriptor for MaterialX data types. More...
 
struct  TypeDesc::Hasher
 Hash operator. More...
 
class  TypeDescRegistry
 Helper class for type registration. More...
 
class  StructTypeDesc
 A type descriptor for MaterialX struct types. More...
 
struct  StructTypeDesc::StructMemberTypeDesc
 
class  StructTypeDescRegistry
 Helper class for struct type registration. More...
 

Macros

#define TYPEDESC_DEFINE_TYPE(T, name, basetype, semantic, size)
 Macro to define global type descriptions for commonly used types.
 
#define TYPEDESC_REGISTER_TYPE(T, name)
 Macro to register a previously defined type in the type registry.
 

Detailed Description

Type descriptor for a MaterialX data type.

Macro Definition Documentation

◆ TYPEDESC_DEFINE_TYPE

#define TYPEDESC_DEFINE_TYPE ( T,
name,
basetype,
semantic,
size )
Value:
static constexpr TypeDesc T(name, basetype, semantic, size);
A type descriptor for MaterialX data types.
Definition TypeDesc.h:36

Macro to define global type descriptions for commonly used types.

◆ TYPEDESC_REGISTER_TYPE

#define TYPEDESC_REGISTER_TYPE ( T,
name )
Value:
TypeDescRegistry register_##T(T, name);
Helper class for type registration.
Definition TypeDesc.h:186

Macro to register a previously defined type in the type registry.

Registration must be done in order for the type to be searchable by name.