opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
osc::ResourceLoader Class Reference

#include <resource_loader.h>

Public Member Functions

 ResourceLoader (std::shared_ptr< VirtualFilesystem > impl, ResourcePath prefix=ResourcePath{})
 
bool resource_exists (const ResourcePath &resource_path)
 
ResourceStream open (const ResourcePath &resource_path)
 
std::string slurp (const ResourcePath &resource_path)
 
ResourceLoader with_prefix (const ResourcePath &prefix) const
 
template<typename StringLike >
requires std::constructible_from<ResourceLoader, StringLike&&>
ResourceLoader with_prefix (StringLike &&str) const
 
cpp23::generator< ResourceDirectoryEntryiterate_directory (const ResourcePath &resource_path)
 

Friends

template<std::derived_from< VirtualFilesystem > TResourceLoader, typename... Args>
requires std::constructible_from<TResourceLoader, Args&&...>
ResourceLoader make_resource_loader (Args &&...)
 

Constructor & Destructor Documentation

◆ ResourceLoader()

osc::ResourceLoader::ResourceLoader ( std::shared_ptr< VirtualFilesystem impl,
ResourcePath  prefix = ResourcePath{} 
)
inlineexplicit

Member Function Documentation

◆ iterate_directory()

cpp23::generator< ResourceDirectoryEntry > osc::ResourceLoader::iterate_directory ( const ResourcePath resource_path)
inline

◆ open()

ResourceStream osc::ResourceLoader::open ( const ResourcePath resource_path)
inline

◆ resource_exists()

bool osc::ResourceLoader::resource_exists ( const ResourcePath resource_path)
inline

◆ slurp()

std::string osc::ResourceLoader::slurp ( const ResourcePath resource_path)
inline

◆ with_prefix() [1/2]

ResourceLoader osc::ResourceLoader::with_prefix ( const ResourcePath prefix) const
inline

◆ with_prefix() [2/2]

template<typename StringLike >
requires std::constructible_from<ResourceLoader, StringLike&&>
ResourceLoader osc::ResourceLoader::with_prefix ( StringLike &&  str) const
inline

Friends And Related Symbol Documentation

◆ make_resource_loader

template<std::derived_from< VirtualFilesystem > TResourceLoader, typename... Args>
requires std::constructible_from<TResourceLoader, Args&&...>
ResourceLoader make_resource_loader ( Args &&  ...)
friend

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