Loading...
Searching...
No Matches
extComputationContext.h
1//
2// Copyright 2017 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_HD_EXT_COMPUTATION_CONTEXT_H
8#define PXR_IMAGING_HD_EXT_COMPUTATION_CONTEXT_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/hd/api.h"
12#include "pxr/base/vt/value.h"
13
14PXR_NAMESPACE_OPEN_SCOPE
15
21public:
22 HdExtComputationContext() = default;
24
31 virtual const VtValue &GetInputValue(const TfToken &name) const = 0;
32
40 const TfToken &name) const = 0;
41
45 virtual void SetOutputValue(const TfToken &name, const VtValue &output) = 0;
46
51 virtual void RaiseComputationError() = 0;
52
53private:
56 = delete;
57};
58
59PXR_NAMESPACE_CLOSE_SCOPE
60
61#endif // PXR_IMAGING_HD_EXT_COMPUTATION_CONTEXT_H
Interface class that defines the execution environment for the client to run a computation.
virtual const VtValue & GetInputValue(const TfToken &name) const =0
Obtains the value of an named input to the computation.
virtual void SetOutputValue(const TfToken &name, const VtValue &output)=0
Set the value of the specified output.
virtual void RaiseComputationError()=0
Called to indicate an error occurred while executing a computation so that its output are invalid.
virtual const VtValue * GetOptionalInputValuePtr(const TfToken &name) const =0
Obtains the value of an named input to the computation.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:71
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:147