HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator > Class Template Reference

#include <dataSourceSchemaBased.h>

+ Inheritance diagram for UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator >:

Public Types

using This = UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator >
 

Public Member Functions

 HD_DECLARE_DATASOURCE (This)
 
TfTokenVector GetNames () override
 
HdDataSourceBaseHandle Get (const TfToken &name) override
 
- Public Member Functions inherited from HdContainerDataSource
 HD_DECLARE_DATASOURCE_ABSTRACT (HdContainerDataSource)
 
- Public Member Functions inherited from HdDataSourceBase
virtual HD_API ~HdDataSourceBase ()=0
 

Static Public Member Functions

static HdDataSourceLocatorSet Invalidate (const TfToken &subprim, const TfTokenVector &usdNames)
 Translate usdNames to data source locators. More...
 
- Static Public Member Functions inherited from HdContainerDataSource
static HD_API
HdDataSourceBaseHandle 
Get (const Handle &container, const HdDataSourceLocator &locator)
 

Detailed Description

template<typename UsdSchemaType, typename UsdSchemaBaseTypes, typename Translator>
class UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator >

A container data source created from a Usd schema and optionally some of its base classes which accesses the attributes on the underlying Usd prim performing translation between the Usd attribute name and the key in the container data source (for implementing Get) or the data source locator (for implementing Invalidate).

The translation starts by taking the non-inherited attributes from the the given UsdSchemaType (e.g., UsdGeomSphere) and the given UsdSchemaBaseTypes and calling Translator::UsdAttributeNameToHdName(usdAttributeName) which can either return the corresponding hydra token or an empty token if the usd attribute should not occur in the data source.

UsdSchemaBaseTypes is a std::tuple of the base schema types that should also be considered and can be std::tuple<> if there is no base schema or no attribute of a base schema should be included.

The data source locator (relevant for invalidation) will be created by appending the hydra token to the data source locator returned by Translator::GetContainerLocator().

Definition at line 65 of file dataSourceSchemaBased.h.

Member Typedef Documentation

template<typename UsdSchemaType , typename UsdSchemaBaseTypes , typename Translator >
using UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator >::This = UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator>

Definition at line 69 of file dataSourceSchemaBased.h.

Member Function Documentation

template<typename UsdSchemaType , typename UsdSchemaBasesTypes , typename Translator >
HdDataSourceBaseHandle UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBasesTypes, Translator >::Get ( const TfToken name)
overridevirtual

Returns the child datasource of the given name. This call is expected to be threadsafe.

Implements HdContainerDataSource.

Definition at line 197 of file dataSourceSchemaBased.h.

template<typename UsdSchemaType , typename UsdSchemaBasesTypes , typename Translator >
TfTokenVector UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBasesTypes, Translator >::GetNames ( )
overridevirtual

Returns the list of names for which Get(...) is expected to return a non-null value. This call is expected to be threadsafe.

Implements HdContainerDataSource.

Definition at line 185 of file dataSourceSchemaBased.h.

template<typename UsdSchemaType , typename UsdSchemaBaseTypes , typename Translator >
UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBaseTypes, Translator >::HD_DECLARE_DATASOURCE ( This  )
template<typename UsdSchemaType , typename UsdSchemaBasesTypes , typename Translator >
HdDataSourceLocatorSet UsdImagingDataSourceSchemaBased< UsdSchemaType, UsdSchemaBasesTypes, Translator >::Invalidate ( const TfToken subprim,
const TfTokenVector usdNames 
)
static

Translate usdNames to data source locators.

Definition at line 229 of file dataSourceSchemaBased.h.


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