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

Binary factory for Blob resources (version 0). More...

#include <BlobFactory.h>

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

Public Member Functions

std::shared_ptr< Ship::IResourceReadResource (std::shared_ptr< Ship::File > file, std::shared_ptr< Ship::ResourceInitData > initData) override
 Deserializes a binary file into a Blob resource.
 
- Public Member Functions inherited from Ship::ResourceFactory
virtual std::shared_ptr< IResourceReadResource (std::shared_ptr< File > file, std::shared_ptr< ResourceInitData > initData)=0
 Deserializes a File into an IResource.
 

Additional Inherited Members

- Protected Member Functions inherited from Ship::ResourceFactoryBinary
bool FileHasValidFormatAndReader (std::shared_ptr< File > file, std::shared_ptr< Ship::ResourceInitData > initData) override
 Validates that the file uses the binary format and contains a BinaryReader.
 

Detailed Description

Binary factory for Blob resources (version 0).

Reads a raw binary blob from a File's BinaryReader and produces a Blob resource.

Member Function Documentation

◆ ReadResource()

std::shared_ptr< Ship::IResource > Ship::ResourceFactoryBinaryBlobV0::ReadResource ( std::shared_ptr< Ship::File file,
std::shared_ptr< Ship::ResourceInitData initData 
)
override

Deserializes a binary file into a Blob resource.

Parameters
fileRaw file data with a BinaryReader.
initDataMetadata parsed from the file header.
Returns
Shared pointer to the constructed Blob, or nullptr on failure.

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