libultraship
Reimplementations of libultra (N64 SDK) functions for modern hardware
Loading...
Searching...
No Matches
Ship::File Struct Reference

Raw file buffer as read from an archive or the filesystem. More...

#include <File.h>

Public Attributes

std::shared_ptr< std::vector< char > > Buffer
 Raw byte buffer of the file contents.
 
size_t BufferOffset = 0
 Byte offset into Buffer where the resource payload starts (after any header).
 
std::variant< std::shared_ptr< tinyxml2::XMLDocument >, std::shared_ptr< BinaryReader > > Reader
 Parsed reader; either a BinaryReader or an XMLDocument, depending on the format.
 
bool IsLoaded = false
 True once the file has been fully loaded from its backing store.
 

Detailed Description

Raw file buffer as read from an archive or the filesystem.

A File object is the intermediate representation between the raw bytes stored in an archive and the fully deserialized IResource. ResourceLoader reads the File's buffer and forwards it to the appropriate ResourceFactory.

Member Data Documentation

◆ Buffer

std::shared_ptr<std::vector<char> > Ship::File::Buffer

Raw byte buffer of the file contents.

◆ BufferOffset

size_t Ship::File::BufferOffset = 0

Byte offset into Buffer where the resource payload starts (after any header).

◆ IsLoaded

bool Ship::File::IsLoaded = false

True once the file has been fully loaded from its backing store.

◆ Reader

std::variant<std::shared_ptr<tinyxml2::XMLDocument>, std::shared_ptr<BinaryReader> > Ship::File::Reader

Parsed reader; either a BinaryReader or an XMLDocument, depending on the format.


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