Loading...
Searching...
No Matches
HdExtComputationContext Class Referenceabstract

Interface class that defines the execution environment for the client to run a computation. More...

#include <extComputationContext.h>

+ Inheritance diagram for HdExtComputationContext:

Public Member Functions

virtual const VtValueGetInputValue (const TfToken &name) const =0
 Obtains the value of an named input to the computation.
 
template<typename T >
GetTypedInputValue (const TfToken &name) const
 Obtains the value of an named input to the computation.
 
virtual const VtValueGetOptionalInputValuePtr (const TfToken &name) const =0
 Obtains the value of an named input to the computation.
 
template<typename T >
const T * GetOptionalTypedInputValuePtr (const TfToken &name) const
 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.
 
template<typename T >
void SetTypedOutputValue (const TfToken &name, const T &output)
 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.
 

Detailed Description

Interface class that defines the execution environment for the client to run a computation.

Definition at line 20 of file extComputationContext.h.

Member Function Documentation

◆ GetInputValue()

virtual const VtValue & GetInputValue ( const TfToken name) const
pure virtual

Obtains the value of an named input to the computation.

The code will issue a coding error and return a empty value if the input is missing.

Implemented in HdExtComputationContextInternal.

◆ GetOptionalInputValuePtr()

virtual const VtValue * GetOptionalInputValuePtr ( const TfToken name) const
pure virtual

Obtains the value of an named input to the computation.

If the input isn't present, a nullptr will be returned.

Implemented in HdExtComputationContextInternal.

◆ GetOptionalTypedInputValuePtr()

const T * GetOptionalTypedInputValuePtr ( const TfToken name) const

Obtains the value of an named input to the computation.

If the input isn't present, a nullptr will be returned. If the input is of the wrong type, a coding error will be issued and a nullptr will be returned.

Definition at line 101 of file extComputationContext.h.

◆ GetTypedInputValue()

T GetTypedInputValue ( const TfToken name) const

Obtains the value of an named input to the computation.

The code will issue a coding error and return a default constructed value if the input is missing or is of the wrong type.

Definition at line 85 of file extComputationContext.h.

◆ RaiseComputationError()

virtual void RaiseComputationError ( )
pure virtual

Called to indicate an error occurred while executing a computation so that its output are invalid.

Implemented in HdExtComputationContextInternal.

◆ SetOutputValue()

virtual void SetOutputValue ( const TfToken name,
const VtValue output 
)
pure virtual

Set the value of the specified output.

Implemented in HdExtComputationContextInternal.

◆ SetTypedOutputValue()

void SetTypedOutputValue ( const TfToken name,
const T &  output 
)

Set the value of the specified output.

Definition at line 121 of file extComputationContext.h.


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