EntropyCanvas::AssetOpState
EntropyCanvas::AssetOpState
Section titled “EntropyCanvas::AssetOpState”Base state object for async asset operations. More…
#include <AssetOperationHandle.h>
Inherits from EntropyEngine::Core::EntropyObject
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| ~AssetOpState() override =default | |
| void | fail(AssetOpError code, std::string msg) |
| void | complete(AssetOpStatus final, std::optional< T > value =std::nullopt) |
| virtual const char * | className() const override Runtime class name for diagnostics and reflection. |
| AssetOpState() =default |
Public Attributes
Section titled “Public Attributes”| Name | |
|---|---|
| std::atomic< uint64_t > | totalBytes |
| std::atomic< AssetOpStatus > | status |
| std::optional< T > | result |
| uint64_t | requestId |
| std::atomic< bool > | isComplete |
| AssetOpErrorInfo | error |
| std::mutex | completionMutex |
| std::condition_variable | completionCV |
| std::atomic< uint64_t > | bytesTransferred |
Additional inherited members
Section titled “Additional inherited members”Protected Classes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleCore Optional handle identity stamped by an owner/registry. |
Public Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| virtual | ~EntropyObject() =default |
| virtual const TypeSystem::TypeInfo * | typeInfo() const Optional richer type information; may be null. |
| bool | tryRetain() const Attempts to retain only if the object is still alive. |
| virtual std::string | toString() const Human-readable short string (class@ptr by default). |
| void | retain() const Increments the reference count. |
| void | release() const Decrements the reference count and deletes when it reaches zero. |
| uint32_t | refCount() const Current reference count (approximate under contention). |
| EntropyObject & | operator=(const EntropyObject & ) =delete |
| EntropyObject & | operator=(EntropyObject && ) =delete |
| bool | hasHandle() const |
| template <class OwnerT > OwnerT * | handleOwnerAs() const Returns the stamped owner pointer cast to the requested type. |
| const void * | handleOwner() const |
| uint32_t | handleIndex() const |
| uint64_t | handleId() const |
| uint32_t | handleGeneration() const |
| WeakControlBlock * | getWeakControlBlock() const Lazily retrieves or creates the weak control block. |
| virtual std::string | description() const Long-form description; defaults to toString(). |
| virtual std::string | debugString() const Debug-oriented string including refcount and handle when present. |
| virtual uint64_t | classHash() const Stable type hash for cross-language identification. |
| EntropyObject() =default | |
| EntropyObject(EntropyObject && ) =delete | |
| EntropyObject(const EntropyObject & ) =delete |
Protected Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| void | _setHandleIdentity(void * owner, uint32_t index, uint32_t generation) |
| void | _clearHandleIdentity() |
Protected Attributes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| std::atomic< WeakControlBlock * > | _weakBlock Lazily allocated control block for weak refs. |
| std::atomic< uint32_t > | _refCount Thread-safe retain/release counter. |
| struct EntropyEngine::Core::EntropyObject::HandleCore | _handle |
Friends inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleAccess |
Detailed Description
Section titled “Detailed Description”template <typename T >class EntropyCanvas::AssetOpState;Base state object for async asset operations.
Derives from EntropyObject for intrusive reference counting. AssetClient stores WeakRef to track pending ops without preventing cleanup. Callers receive RefObject handles for strong ownership.
Public Functions Documentation
Section titled “Public Functions Documentation”function ~AssetOpState
Section titled “function ~AssetOpState”~AssetOpState() override =defaultfunction fail
Section titled “function fail”inline void fail( AssetOpError code, std::string msg)function complete
Section titled “function complete”inline void complete( AssetOpStatus final, std::optional< T > value =std::nullopt)function className
Section titled “function className”inline virtual const char * className() const overrideRuntime class name for diagnostics and reflection.
Reimplements: EntropyEngine::Core::EntropyObject::className
function AssetOpState
Section titled “function AssetOpState”AssetOpState() =defaultPublic Attributes Documentation
Section titled “Public Attributes Documentation”variable totalBytes
Section titled “variable totalBytes”std::atomic< uint64_t > totalBytes {0};variable status
Section titled “variable status”std::atomic< AssetOpStatus > status {AssetOpStatus::Pending};variable result
Section titled “variable result”std::optional< T > result;variable requestId
Section titled “variable requestId”uint64_t requestId = 0;variable isComplete
Section titled “variable isComplete”std::atomic< bool > isComplete {false};variable error
Section titled “variable error”AssetOpErrorInfo error;variable completionMutex
Section titled “variable completionMutex”std::mutex completionMutex;variable completionCV
Section titled “variable completionCV”std::condition_variable completionCV;variable bytesTransferred
Section titled “variable bytesTransferred”std::atomic< uint64_t > bytesTransferred {0};Updated on 2026-01-26 at 17:14:35 -0500