FnUsdAbstractionLib  14.0.8
usg::Schema Class Reference

#include <Schema.h>

Inheritance diagram for usg::Schema:
usg::ShaderSchema usg::CoShaderSchema usg::LightShaderSchema usg::SurfaceShaderSchema

Public Member Functions

 Schema (const SchemaDescription &pluginDescription, const SchemaPropertyArray &properties, const fdk::KeyValueMap &metadata=fdk::KeyValueMap())
 
virtual ~Schema ()
 Dtor in implementation required for std::unique_ptr to work.
 
virtual const TokenbaseTypeName () const
 
virtual void getSourceTypes (TokenSet &types) const
 
virtual ShaderSchemaasShaderSchema ()
 

Static Public Member Functions

static const SchemaDescriptionfind (const char *schema_name)
 Find a SchemaDescription by schema name and optional source-type - NOT the plugin .so filename!
 

Static Protected Member Functions

static Schemacreate (const char *schema_name)
 

Protected Attributes

std::unique_ptr< ShaderSchemaHandle > _pImpl
 

Friends

class SchemaBuiltinParser
 

Detailed Description

Schema class creates SchemaDesc definitions stored in the registry.

Constructor & Destructor Documentation

usg::Schema::Schema ( const SchemaDescription pluginDescription,
const SchemaPropertyArray &  properties,
const fdk::KeyValueMap &  metadata = fdk::KeyValueMap() 
)

The shader class name is taken from the SchemaDescription::schemaName(), so the subclass must pass its SchemaDescription.

Member Function Documentation

virtual const Token& usg::Schema::baseTypeName ( ) const
inlinevirtual

Return the base schema type string used to determine the handling of property types and where to support source types. Only a few are currently supported: 'UsgSchema' schema describes a set of properties for a generic Prim, the default. 'UsgShader' schema describes a ShaderSchema, which has specific property type restrictions

Reimplemented in usg::ShaderSchema.

virtual void usg::Schema::getSourceTypes ( TokenSet &  types) const
inlinevirtual

Get the set of additional source types to create for this Schema. Currently only used for ShaderSchema subclasses. An example of an additional source type would be 'glslfx'. Default implementation does nothing.

static Schema* usg::Schema::create ( const char *  schema_name)
staticprotected

Create a Schema singleton instance based on a shader class name or an existing shader plugin description. This should only be called during SchemaDescription ctor.



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com