#include <RadientDataBlob.h>
Public Attributes | |
| Uint64 | Size = 0 |
| const void * | pData = nullptr |
| RadientDataBlobReadReleaseCallbackType | OnLastReaderReleased = nullptr |
| void * | pUserData = nullptr |
| RadientDataBlobDestroyCallbackType | OnDestroy = nullptr |
Shared creation parameters for read-only and mutable CPU blobs. Both factories copy the descriptor during the call. The source bytes are copied for owning storage or referenced for REFERENCE storage as described below.
| RadientDataBlobDestroyCallbackType Diligent::RadientDataBlobCreateInfo::OnDestroy = nullptr |
Optional final-destruction callback for any storage mode. Invoked exactly once for a successfully created blob, independently of read cycles. It can release referenced storage or its owner, and clean up pUserData. It is never invoked on creation failure. It must not access the dying blob or throw. Defaults to nullptr; in REFERENCE mode, storage lifetime is then managed externally and still extends through the blob's entire lifetime.
| RadientDataBlobReadReleaseCallbackType Diligent::RadientDataBlobCreateInfo::OnLastReaderReleased = nullptr |
Optional callback invoked once per reader-count transition from one to zero, including for empty blobs. Creation, writes, resizing, failed access attempts, and destruction do not invoke it. Registration remains fixed for the blob's lifetime. Defaults to nullptr, which disables notifications.
| const void* Diligent::RadientDataBlobCreateInfo::pData = nullptr |
Source bytes. For COPY storage and CreateRadientMutableDataBlob, creation copies Size bytes from this pointer, or zero-fills storage when it is null. For REFERENCE storage, the blob uses this pointer directly: it is required when Size is nonzero, and the bytes remain alive and unchanged throughout the blob's lifetime. OnDestroy and pUserData can retain and release their owner. Ignored when Size is zero. Defaults to nullptr.
| void* Diligent::RadientDataBlobCreateInfo::pUserData = nullptr |
Opaque context passed unchanged to both callbacks. The pointer is stored; the pointed-to data is not copied or automatically destroyed. When a callback uses the context, it remains valid through callback execution. OnDestroy can release it after successful creation. On failure, cleanup remains with the caller. May be null; defaults to nullptr.
| Uint64 Diligent::RadientDataBlobCreateInfo::Size = 0 |
Initial number of bytes exposed by the blob. Read-only blobs keep this size; mutable blobs can change it with IRadientMutableDataBlob::Resize. Zero creates a valid empty blob; successful access returns a null pointer. Owning storage is limited to the implementation's addressable allocation range; REFERENCE storage requires a size representable by size_t. Unsupported sizes return RADIENT_STATUS_INVALID_ARGUMENT. Defaults to zero.