8#ifndef PXR_IMAGING_HD_VECTOR_SCHEMA_H
9#define PXR_IMAGING_HD_VECTOR_SCHEMA_H
11#include "pxr/imaging/hd/api.h"
13#include "pxr/imaging/hd/dataSource.h"
15PXR_NAMESPACE_OPEN_SCOPE
28 static HdVectorDataSourceHandle
31 const HdDataSourceBaseHandle *values);
37 bool IsDefined()
const;
41 explicit operator bool()
const {
return IsDefined(); }
51 typename T::Handle _GetTyped(
const size_t element)
const {
54 ? T::Cast(_vector->GetElement(element))
58 HdVectorDataSourceHandle _vector;
71 typename T::Handle GetElement(
const size_t element)
const {
72 return _GetTyped<T>(element);
79template<
typename Schema>
86 Schema GetElement(
const size_t element)
const {
87 using DataSource =
typename Schema::UnderlyingDataSource;
88 return Schema(_GetTyped<DataSource>(element));
92PXR_NAMESPACE_CLOSE_SCOPE
Template class wrapping a vector data source whose children are container data source conforming to a...
Template class wrapping a vector data source whose children are data source of an expected type.
A datasource representing indexed data.
Base class wrapping a vector data source.
HD_API size_t GetNumElements() const
Number of elements in the vector.
HD_API HdVectorDataSourceHandle GetVector()
Returns the vector data source that this schema is interpreting.