HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ShaderMetadataRegistry Class Reference

#include <ShaderNode.h>

+ Inheritance diagram for ShaderMetadataRegistry:

Public Member Functions

void addMetadata (const string &name, const TypeDesc *type, ValuePtr value=nullptr)
 
const ShaderMetadatafindMetadata (const string &name) const
 
ShaderMetadatafindMetadata (const string &name)
 
const ShaderMetadataVecgetAllMetadata () const
 Return all entries in the registry. More...
 
void clear ()
 Clear all entries in the registry. More...
 
- Public Member Functions inherited from GenUserData
virtual ~GenUserData ()
 
GenUserDataPtr getSelf ()
 Return a shared pointer for this object. More...
 
ConstGenUserDataPtr getSelf () const
 Return a shared pointer for this object. More...
 
template<class T >
shared_ptr< TasA ()
 Return this object cast to a templated type. More...
 
template<class T >
shared_ptr< const TasA () const
 Return this object cast to a templated type. More...
 

Static Public Attributes

static const string USER_DATA_NAME
 

Protected Attributes

vector< ShaderMetadata_entries
 
std::unordered_map< string,
size_t > 
_entryIndex
 

Additional Inherited Members

- Protected Member Functions inherited from GenUserData
 GenUserData ()
 

Detailed Description

A registry for metadata that will be exported to the generated shader if found on nodes and inputs during shader generation.

Definition at line 58 of file ShaderNode.h.

Member Function Documentation

void ShaderMetadataRegistry::addMetadata ( const string name,
const TypeDesc type,
ValuePtr  value = nullptr 
)
inline

Add a new metadata entry to the registry. The entry contains the name and data type for the metadata.

Definition at line 66 of file ShaderNode.h.

void ShaderMetadataRegistry::clear ( )
inline

Clear all entries in the registry.

Definition at line 98 of file ShaderNode.h.

const ShaderMetadata* ShaderMetadataRegistry::findMetadata ( const string name) const
inline

Return the metadata registered for the given name, or nullptr if no such entry is found.

Definition at line 77 of file ShaderNode.h.

ShaderMetadata* ShaderMetadataRegistry::findMetadata ( const string name)
inline

Return the metadata registered for the given name, or nullptr if no such entry is found.

Definition at line 85 of file ShaderNode.h.

const ShaderMetadataVec& ShaderMetadataRegistry::getAllMetadata ( ) const
inline

Return all entries in the registry.

Definition at line 92 of file ShaderNode.h.

Member Data Documentation

vector<ShaderMetadata> ShaderMetadataRegistry::_entries
protected

Definition at line 105 of file ShaderNode.h.

std::unordered_map<string, size_t> ShaderMetadataRegistry::_entryIndex
protected

Definition at line 106 of file ShaderNode.h.

const string ShaderMetadataRegistry::USER_DATA_NAME
static

Definition at line 61 of file ShaderNode.h.


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