ezEngine  Release 25.03
ezBlob Class Reference

ezBlob allows to store simple binary data larger than 4GB. This storage class is used by ezImage to allow processing of large textures for example. In the current implementation the start of the allocated memory is guaranteed to be 64 byte aligned. More...

#include <Blob.h>

Public Member Functions

 EZ_DECLARE_MEM_RELOCATABLE_TYPE ()
 
 ezBlob ()
 Default constructor. Does not allocate any memory.
 
 ezBlob (ezBlob &&other)
 Move constructor. Moves the storage pointer from the other blob to this blob.
 
void operator= (ezBlob &&rhs)
 Move assignment. Moves the storage pointer from the other blob to this blob.
 
 ~ezBlob ()
 Default destructor. Will call Clear() to deallocate the memory.
 
void SetFrom (const void *pSource, ezUInt64 uiSize)
 Sets the blob to the content of pSource. This will allocate the necessary memory if needed and then copy uiSize bytes from pSource.
 
void Clear ()
 Deallocates the memory allocated by this instance.
 
bool IsEmpty () const
 \bried Is data blob empty
 
void SetCountUninitialized (ezUInt64 uiCount)
 Allocates uiCount bytes for storage in this object. The bytes will have undefined content.
 
void ZeroFill ()
 Convenience method to clear the content of the blob to all 0 bytes.
 
template<typename T >
ezBlobPtr< T > GetBlobPtr ()
 Returns a blob pointer to the blob data, or an empty blob pointer if the blob is empty.
 
template<typename T >
ezBlobPtr< const T > GetBlobPtr () const
 Returns a blob pointer to the blob data, or an empty blob pointer if the blob is empty.
 
ezByteBlobPtr GetByteBlobPtr ()
 Returns a blob pointer to the blob data, or an empty blob pointer if the blob is empty.
 
ezConstByteBlobPtr GetByteBlobPtr () const
 Returns a blob pointer to the blob data, or an empty blob pointer if the blob is empty.
 

Detailed Description

ezBlob allows to store simple binary data larger than 4GB. This storage class is used by ezImage to allow processing of large textures for example. In the current implementation the start of the allocated memory is guaranteed to be 64 byte aligned.


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