libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::Blob Class Referencefinal

Resource type representing a generic binary blob. More...

#include <Blob.h>

Inheritance diagram for Ship::Blob:
[legend]
Collaboration diagram for Ship::Blob:
[legend]

Public Member Functions

 Blob ()
 Default-constructs an empty Blob resource.
 
void * GetPointer () override
 Returns a pointer to the start of the raw byte data.
 
size_t GetPointerSize () override
 Returns the size in bytes of the blob data.
 
- Public Member Functions inherited from Ship::Resource< void >
void * GetRawPointer () override
 Returns a type-erased raw pointer to the underlying resource data.
 
 IResource (std::shared_ptr< ResourceInitData > initData)
 Constructs an IResource with the given initialization data.
 
- Public Member Functions inherited from Ship::IResource
 IResource (std::shared_ptr< ResourceInitData > initData)
 Constructs an IResource with the given initialization data.
 
virtual ~IResource ()
 
bool IsDirty ()
 Returns true if the resource has been marked dirty.
 
void Dirty ()
 Marks the resource as dirty.
 
std::shared_ptr< ResourceInitDataGetInitData ()
 Returns the initialization data used to load this resource.
 

Public Attributes

std::vector< uint8_t > Data
 Raw binary payload.
 

Additional Inherited Members

- Static Public Attributes inherited from Ship::IResource
static const std::string gAltAssetPrefix = "alt/"
 Path prefix that identifies an "alt asset" override.
 

Detailed Description

Resource type representing a generic binary blob.

The raw bytes are stored in the Data vector and exposed through the typed Resource interface. Use ResourceType::Blob when registering a factory for this type.

Constructor & Destructor Documentation

◆ Blob()

Ship::Blob::Blob ( )

Default-constructs an empty Blob resource.

Member Function Documentation

◆ GetPointer()

void * Ship::Blob::GetPointer ( )
overridevirtual

Returns a pointer to the start of the raw byte data.

Returns
Pointer to the first element of Data, or nullptr if empty.

Implements Ship::Resource< void >.

◆ GetPointerSize()

size_t Ship::Blob::GetPointerSize ( )
overridevirtual

Returns the size in bytes of the blob data.

Returns
Number of bytes in Data.

Implements Ship::IResource.

Member Data Documentation

◆ Data

std::vector<uint8_t> Ship::Blob::Data

Raw binary payload.


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