CPU read-only buffer of arbitrary size.
More...
#include <Blob.h>
|
| | Blob () |
| | Construcst an empty blob.
|
| | Blob (Blob &&rhs) noexcept |
| | Move constructor.
|
| Blob & | operator= (Blob &&rhs) noexcept |
| | Move operator.
|
| | Blob (const void *data, std::size_t size, bool isWeakRef=false) |
| | Constructs the blob with a copy of the specified data or a weak reference to the data.
|
| | ~Blob () |
| | Deletes the internal memory blob.
|
| const void * | GetData () const |
| | Returns a constant pointer to the internal buffer or null if this is a default initialized blob.
|
| std::size_t | GetSize () const |
| | Returns the size (in bytes) of the internal buffer or zero if this is a default initialized blob.
|
| | operator bool () const |
| | Returns true if this blob is non-empty.
|
| | NonCopyable (const NonCopyable &)=delete |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| virtual | ~NonCopyable ()=default |
|
| static Blob | CreateCopy (const Blob &other) |
| | Creates a new BLob instance with a copy of the specified blob data.
|
| static Blob | CreateCopy (const void *data, std::size_t size) |
| | Creates a new Blob instance with a copy of the specified data.
|
| static Blob | CreateWeakRef (const void *data, std::size_t size) |
| | Creates a new Blob instance with a weak reference to the specified data.
|
| static Blob | CreateStrongRef (DynamicByteArray &&cont) |
| | Creates a new Blob instance with a strong reference to the specified byte array container.
|
| static Blob | CreateStrongRef (std::vector< char > &&cont) |
| | Creates a new Blob instance with a strong reference to the specified vector container.
|
| static Blob | CreateStrongRef (std::string &&str) |
| | Creates a new Blob instance with a strong reference to the specified string container.
|
| static Blob | CreateFromFile (const char *filename) |
| | Creates a new Blob instance with the data read from the specified binary file.
|
| static Blob | CreateFromFile (const std::string &filename) |
| | Creates a new Blob instance with the data read from the specified binary file.
|
CPU read-only buffer of arbitrary size.
- See also
- RenderSystem::CreatePipelineState
◆ Blob() [1/3]
Construcst an empty blob.
◆ Blob() [2/3]
| LLGL::Blob::Blob |
( |
Blob && | rhs | ) |
|
|
noexcept |
◆ Blob() [3/3]
| LLGL::Blob::Blob |
( |
const void * | data, |
|
|
std::size_t | size, |
|
|
bool | isWeakRef = false ) |
Constructs the blob with a copy of the specified data or a weak reference to the data.
- Parameters
-
| [in] | data | Raw pointer to the data this blob is meant to take care of. |
| [in] | size | Specifies the size (in bytes) of the memory data pointer to. |
| [in] | isWeakRef | If this is true, this blob only references the data but does not copy it. In this case, the caller is responsible for managing the lifetime of the data and it must remain valid until the end of this blob. By default false. |
◆ ~Blob()
Deletes the internal memory blob.
◆ CreateCopy() [1/2]
| Blob LLGL::Blob::CreateCopy |
( |
const Blob & | other | ) |
|
|
static |
Creates a new BLob instance with a copy of the specified blob data.
◆ CreateCopy() [2/2]
| Blob LLGL::Blob::CreateCopy |
( |
const void * | data, |
|
|
std::size_t | size ) |
|
static |
Creates a new Blob instance with a copy of the specified data.
- Parameters
-
| [in] | data | Pointer to the data that is to be copied and managed by this blob. |
| [in] | size | Specifies the size (in bytes) of the data. |
- Returns
- New instance of Blob that manages the memory that is copied.
◆ CreateFromFile() [1/2]
| Blob LLGL::Blob::CreateFromFile |
( |
const char * | filename | ) |
|
|
static |
Creates a new Blob instance with the data read from the specified binary file.
- Parameters
-
| [in] | filename | Specifies the file that is to be read. |
- Returns
- New instance of Blob that manages the memory of a content copy from the specified file or null if the file could not be read.
◆ CreateFromFile() [2/2]
| Blob LLGL::Blob::CreateFromFile |
( |
const std::string & | filename | ) |
|
|
static |
Creates a new Blob instance with the data read from the specified binary file.
- Parameters
-
| [in] | filename | Specifies the file that is to be read. |
- Returns
- New instance of Blob that manages the memory of a content copy from the specified file or null if the file could not be read.
◆ CreateStrongRef() [1/3]
Creates a new Blob instance with a strong reference to the specified byte array container.
- Parameters
-
| [in] | cont | Specifies the container whose data is to be moved into this Blob instance. |
- Returns
- New instance of Blob that manages the specified unique pointer.
◆ CreateStrongRef() [2/3]
| Blob LLGL::Blob::CreateStrongRef |
( |
std::string && | str | ) |
|
|
static |
Creates a new Blob instance with a strong reference to the specified string container.
- Parameters
-
| [in] | str | Specifies the container whose data is to be moved into this Blob instance. |
- Returns
- New instance of Blob that manages the specified container.
◆ CreateStrongRef() [3/3]
| Blob LLGL::Blob::CreateStrongRef |
( |
std::vector< char > && | cont | ) |
|
|
static |
Creates a new Blob instance with a strong reference to the specified vector container.
- Parameters
-
| [in] | cont | Specifies the container whose data is to be moved into this Blob instance. |
- Returns
- New instance of Blob that manages the specified container.
◆ CreateWeakRef()
| Blob LLGL::Blob::CreateWeakRef |
( |
const void * | data, |
|
|
std::size_t | size ) |
|
static |
Creates a new Blob instance with a weak reference to the specified data.
- Parameters
-
| [in] | data | Pointer to the data that is to be referenced. This pointer must remain valid for the lifetime of this Blob instance. |
| [in] | size | Specifies the size (in bytes) of the data. |
- Returns
- New instance of Blob that refers to the specified memory.
◆ GetData()
| const void * LLGL::Blob::GetData |
( |
| ) |
const |
Returns a constant pointer to the internal buffer or null if this is a default initialized blob.
◆ GetSize()
| std::size_t LLGL::Blob::GetSize |
( |
| ) |
const |
Returns the size (in bytes) of the internal buffer or zero if this is a default initialized blob.
◆ operator bool()
| LLGL::Blob::operator bool |
( |
| ) |
const |
Returns true if this blob is non-empty.
◆ operator=()
| Blob & LLGL::Blob::operator= |
( |
Blob && | rhs | ) |
|
|
noexcept |
The documentation for this class was generated from the following file: