![]() |
|
An abstract base class for a plain old data buffer source that doesn't need to be resolved. More...
#include <bufferSource.h>
Inheritance diagram for HdResolvedBufferSource:Public Member Functions | |
| HD_API bool | Resolve () override |
| Prepare the access of GetData(). | |
Public Member Functions inherited from HdBufferSource | |
| virtual TfToken const & | GetName () const =0 |
| Return the name of this buffer source. | |
| virtual void | GetBufferSpecs (HdBufferSpecVector *specs) const =0 |
| Add the buffer spec for this buffer source into given bufferspec vector. | |
| virtual HD_API size_t | ComputeHash () const |
| Computes and returns a hash value for the underlying data. | |
| virtual bool | Resolve ()=0 |
| Prepare the access of GetData(). | |
| virtual void const * | GetData () const =0 |
| Following interfaces will be called after Resolve. | |
| virtual HdTupleType | GetTupleType () const =0 |
| Returns the data type and count (array size) for this buffer source. | |
| virtual size_t | GetNumElements () const =0 |
| Returns the number of elements (e.g. | |
| bool | IsResolved () const |
| Returns true it this computation has already been resolved. | |
| bool | HasResolveError () const |
| Returns true if an error occurred during resolve. | |
| HD_API bool | IsValid () const |
| Checks the validity of the source buffer. | |
| virtual HD_API bool | HasPreChainedBuffer () const |
| Returns true if this buffer has a pre-chained buffer. | |
| virtual HD_API HdBufferSourceSharedPtr | GetPreChainedBuffer () const |
| Returns the pre-chained buffer. | |
| virtual HD_API bool | HasChainedBuffer () const |
| Returns true if this buffer has any chained buffer(s) | |
| virtual HD_API HdBufferSourceSharedPtrVector | GetChainedBuffers () const |
| Returns the vector of chained buffers. | |
Additional Inherited Members | |
Protected Types inherited from HdBufferSource | |
| enum | State { UNRESOLVED =0 , BEING_RESOLVED , RESOLVED , RESOLVE_ERROR } |
Protected Member Functions inherited from HdBufferSource | |
| void | _SetResolved () |
| Marks this buffer source as resolved. | |
| void | _SetResolveError () |
| Called during Resolve() to indicate an unrecoverable failure occurred and the results of the computation can not be used. | |
| bool | _TryLock () |
| Non-blocking lock acquisition. | |
| virtual bool | _CheckValid () const =0 |
| Checks the validity of the source buffer. | |
| HdBufferSource (State state) | |
An abstract base class for a plain old data buffer source that doesn't need to be resolved.
Definition at line 193 of file bufferSource.h.
|
inline |
Definition at line 195 of file bufferSource.h.
|
inlineoverridevirtual |
Prepare the access of GetData().
This process may include some computations (e.g. cpu smooth normals). Note: Resolve may be called in parallel from multiple threads across buffer sources, so be careful if it uses static/shared states among objects. Returns true if it resolved. If the buffer source has to wait some results of other buffer sources, or the buffer source is being resolved by other threads, it returns false.
Implements HdBufferSource.
Reimplemented in HdVtBufferSource.
Definition at line 198 of file bufferSource.h.