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

Uniquely identifies a cached resource by path/hash, owner, and source archive. More...

#include <ResourceIdentifier.h>

Public Member Functions

 ResourceIdentifier ()=default
 
 ResourceIdentifier (std::string path, const uintptr_t owner=0, const std::shared_ptr< Archive > parent=nullptr)
 
 ResourceIdentifier (uint64_t hash, const uintptr_t owner=0, const std::shared_ptr< Archive > parent=nullptr)
 
bool operator== (const ResourceIdentifier &rhs) const
 
bool IsPath () const
 
bool IsHash () const
 
const std::string & GetPath () const
 
uint64_t GetPathHash () const
 
const std::variant< std::string, uint64_t > & GetPathOrHash () const
 
uintptr_t GetOwner () const
 
const std::shared_ptr< Archive > & GetParent () const
 
void SetPath (const std::string &path)
 
void SetPath (std::string &&path)
 
void SetHash (uint64_t hash)
 
void SetPathOrHash (std::variant< std::string, uint64_t > pathOrHash)
 
void SetOwner (uintptr_t owner)
 
void SetParent (const std::shared_ptr< Archive > &parent)
 

Friends

struct ResourceIdentifierHash
 

Detailed Description

Uniquely identifies a cached resource by path/hash, owner, and source archive.

Constructor & Destructor Documentation

◆ ResourceIdentifier() [1/3]

Ship::ResourceIdentifier::ResourceIdentifier ( )
default

◆ ResourceIdentifier() [2/3]

Ship::ResourceIdentifier::ResourceIdentifier ( std::string  path,
const uintptr_t  owner = 0,
const std::shared_ptr< Archive parent = nullptr 
)
inline

◆ ResourceIdentifier() [3/3]

Ship::ResourceIdentifier::ResourceIdentifier ( uint64_t  hash,
const uintptr_t  owner = 0,
const std::shared_ptr< Archive parent = nullptr 
)
inline

Member Function Documentation

◆ GetOwner()

uintptr_t Ship::ResourceIdentifier::GetOwner ( ) const
inline

◆ GetParent()

const std::shared_ptr< Archive > & Ship::ResourceIdentifier::GetParent ( ) const
inline

◆ GetPath()

const std::string & Ship::ResourceIdentifier::GetPath ( ) const
inline

◆ GetPathHash()

uint64_t Ship::ResourceIdentifier::GetPathHash ( ) const
inline

◆ GetPathOrHash()

const std::variant< std::string, uint64_t > & Ship::ResourceIdentifier::GetPathOrHash ( ) const
inline

◆ IsHash()

bool Ship::ResourceIdentifier::IsHash ( ) const
inline

◆ IsPath()

bool Ship::ResourceIdentifier::IsPath ( ) const
inline

◆ operator==()

bool Ship::ResourceIdentifier::operator== ( const ResourceIdentifier rhs) const
inline

◆ SetHash()

void Ship::ResourceIdentifier::SetHash ( uint64_t  hash)
inline

◆ SetOwner()

void Ship::ResourceIdentifier::SetOwner ( uintptr_t  owner)
inline

◆ SetParent()

void Ship::ResourceIdentifier::SetParent ( const std::shared_ptr< Archive > &  parent)
inline

◆ SetPath() [1/2]

void Ship::ResourceIdentifier::SetPath ( const std::string &  path)
inline

◆ SetPath() [2/2]

void Ship::ResourceIdentifier::SetPath ( std::string &&  path)
inline

◆ SetPathOrHash()

void Ship::ResourceIdentifier::SetPathOrHash ( std::variant< std::string, uint64_t >  pathOrHash)
inline

Friends And Related Symbol Documentation

◆ ResourceIdentifierHash

friend struct ResourceIdentifierHash
friend

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