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

#include <executionTypeRegistry.h>

Classes

class  _Value
 

Public Member Functions

 VdfExecutionTypeRegistry (const VdfExecutionTypeRegistry &)=delete
 
VdfExecutionTypeRegistryoperator= (const VdfExecutionTypeRegistry &)=delete
 
VDF_API ~VdfExecutionTypeRegistry ()
 
template<typename T >
const TGetFallback () const
 

Static Public Member Functions

static VDF_API
VdfExecutionTypeRegistry
GetInstance ()
 
template<typename T >
static TfType Define (const T &fallback)
 
template<typename T , typename B >
static TfType Define (const T &fallback)
 
template<typename T >
static TfType CheckForRegistration (const char *const additionalErrorMsg=nullptr)
 
static VDF_API TfType CheckForRegistration (const std::type_info &typeInfo, const char *const additionalErrorMsg)
 
static VDF_API VdfVector CreateEmptyVector (TfType type)
 
static VDF_API void FillVector (TfType type, size_t numElements, VdfVector *vector)
 

Friends

class TfSingleton< VdfExecutionTypeRegistry >
 

Detailed Description

Manages low-level value type functionality used within execution.

All types used as values in execution must be registered with VdfExecutionTypeRegistry::Define.

All API is thread safe.

Definition at line 37 of file executionTypeRegistry.h.

Constructor & Destructor Documentation

VdfExecutionTypeRegistry::VdfExecutionTypeRegistry ( const VdfExecutionTypeRegistry )
delete
VDF_API VdfExecutionTypeRegistry::~VdfExecutionTypeRegistry ( )

Member Function Documentation

template<typename T >
static TfType VdfExecutionTypeRegistry::CheckForRegistration ( const char *const  additionalErrorMsg = nullptr)
inlinestatic

Checks if T is defined as an execution value type.

Returns the TfType of T. If the check fails, a fatal error will be issued. The intent is to make sure that all required types are registered at the time this method is called.

Use additionalErrorMsg to append a custom message if a fatal error is emitted.

Definition at line 90 of file executionTypeRegistry.h.

static VDF_API TfType VdfExecutionTypeRegistry::CheckForRegistration ( const std::type_info &  typeInfo,
const char *const  additionalErrorMsg 
)
static

Checks if ti is defined as an execution value type.

This method will issue a fatal error if the type isn't registered.

static VDF_API VdfVector VdfExecutionTypeRegistry::CreateEmptyVector ( TfType  type)
static

Create an empty VdfVector holding empty data of the given TfType.

Note this creates an empty vector, not a fallback-valued vector. See also VdfTypedVector for creating empty vectors by type.

template<typename T >
TfType VdfExecutionTypeRegistry::Define ( const T fallback)
static

Registers T with execution's runtime type dispatch system.

fallback is required because execution supports types that are not default constructible as well as types for which a default-constructed value is not the desired fallback value.

This call will also define T with TfType if it is not registered yet.

Definition at line 216 of file executionTypeRegistry.h.

template<typename T , typename B >
TfType VdfExecutionTypeRegistry::Define ( const T fallback)
static

Registers T with execution's runtime type dispatch system as a derived type of B.

Definition at line 235 of file executionTypeRegistry.h.

static VDF_API void VdfExecutionTypeRegistry::FillVector ( TfType  type,
size_t  numElements,
VdfVector vector 
)
static

Fills vector with the fallback value registered for the given type.

template<typename T >
const T & VdfExecutionTypeRegistry::GetFallback ( ) const
inline

Returns the registered fallback value for T from the registry.

It is a fatal error to query types that are not registered.

Definition at line 276 of file executionTypeRegistry.h.

static VDF_API VdfExecutionTypeRegistry& VdfExecutionTypeRegistry::GetInstance ( )
static

Returns the VdfExecutionTypeRegistry singleton instance.

VdfExecutionTypeRegistry& VdfExecutionTypeRegistry::operator= ( const VdfExecutionTypeRegistry )
delete

Friends And Related Function Documentation

Definition at line 119 of file executionTypeRegistry.h.


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