24 #ifndef PXR_IMAGING_HD_TASK_H
25 #define PXR_IMAGING_HD_TASK_H
41 #include <unordered_map>
52 std::unordered_map<TfToken, VtValue, TfToken::HashFunctor>;
206 HdTask(
const HdTask &) =
delete;
207 HdTask &operator =(
const HdTask &) =
delete;
223 HdTaskContext::const_iterator valueIt = ctx->find(
id);
224 if (valueIt == ctx->cend()) {
229 const VtValue &valueVt = (valueIt->second);
250 VtValue valueVt = delegate->
Get(taskId, HdTokens->params);
268 auto it = ctx->find(HdTokens->drivers);
269 if (it != ctx->end()) {
273 for (
HdDriver* hdDriver : drivers) {
274 if (hdDriver->name == driverName) {
275 if (hdDriver->driver.IsHolding<
T>()) {
276 return hdDriver->driver.UncheckedGet<
T>();
288 #endif // PXR_IMAGING_HD_TASK_H
SDF_API const char * GetText() const
SdfPath const & GetId() const
T const & UncheckedGet() const &
std::vector< HdTaskSharedPtr > HdTaskSharedPtrVector
static T _GetDriver(HdTaskContext const *ctx, TfToken const &driverName)
#define TF_DEV_AXIOM(cond)
std::vector< HdDriver * > HdDriverVector
virtual HD_API HdDirtyBits GetInitialDirtyBitsMask() const
std::vector< TfToken > TfTokenVector
Convenience types.
virtual void Prepare(HdTaskContext *ctx, HdRenderIndex *renderIndex)=0
virtual void Sync(HdSceneDelegate *delegate, HdTaskContext *ctx, HdDirtyBits *dirtyBits)=0
std::unordered_map< TfToken, VtValue, TfToken::HashFunctor > HdTaskContext
HD_API TfTokenVector _GetTaskRenderTags(HdSceneDelegate *delegate)
virtual HD_API const TfTokenVector & GetRenderTags() const
virtual void Execute(HdTaskContext *ctx)=0
virtual HD_API VtValue Get(SdfPath const &id, TfToken const &key)
Returns a named value.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
bool _GetTaskParams(HdSceneDelegate *delegate, T *outValue)
static HD_API bool _HasTaskContextData(HdTaskContext const *ctx, TfToken const &id)
Check if the shared context contains a value for the given id.
std::shared_ptr< class HdTask > HdTaskSharedPtr
static bool _GetTaskContextData(HdTaskContext const *ctx, TfToken const &id, T *outValue)