#include <ResourceManagementSystem.hpp>
Public Member Functions | |
ResourceManagementSystem (SystemContainer *sc) | |
~ResourceManagementSystem () | |
virtual std::string | debug_name () const override |
virtual void | status (TextDebugView *view) override |
template<class TResource > | |
bool | has_path (ResourcePath path) |
template<class TResource > | |
const TResource * | get (ResourcePath path) |
template<class TResource > | |
void | each_resource (std::function< void(ResourcePath const &path) > const &) |
void | register_provider (ResourceProvider *provider, size_t priority) |
void | unregister_provider (ResourceProvider *provider) |
Public Member Functions inherited from iv::System | |
System (SystemContainer *sc) | |
virtual | ~System () |
virtual bool | flushSystem () |
SystemContainer * | system_container () const |
void | retain () |
void | release () |
Public Member Functions inherited from iv::Context | |
Context () | |
virtual | ~Context () |
template<class ... Items> | |
void | log (SrcInfo const &info, LogId id, Items const &... items) const |
bool | log_enabled (LogId id) const |
template<class ... Items> | |
void | warning (SrcInfo const &info, Items const &... items) const |
Additional Inherited Members | |
Protected Member Functions inherited from iv::System | |
virtual bool | log_process_enabled (LogId id) const override final |
virtual void | log_process (SrcInfo const &info, LogId id, std::string const &message) const override final |
Detailed Description
Helps to use shared and streamed resources and abstracts file access (file system, zip file, net sync, manualy created instances, ...). Each resource is identified by its type (c++ class) and virtual file path.
Definition at line 37 of file ResourceManagementSystem.hpp.
Constructor & Destructor Documentation
◆ ResourceManagementSystem()
iv::ResourceManagementSystem::ResourceManagementSystem | ( | SystemContainer * | sc | ) |
Definition at line 8 of file ResourceManagementSystem.cpp.
◆ ~ResourceManagementSystem()
iv::ResourceManagementSystem::~ResourceManagementSystem | ( | ) |
Definition at line 14 of file ResourceManagementSystem.cpp.
Member Function Documentation
◆ debug_name()
|
inlineoverridevirtual |
Reimplemented from iv::System.
Definition at line 42 of file ResourceManagementSystem.hpp.
◆ status()
|
overridevirtual |
Reimplemented from iv::System.
Definition at line 33 of file ResourceManagementSystem.cpp.
◆ has_path()
bool iv::ResourceManagementSystem::has_path | ( | ResourcePath | path | ) |
Definition at line 5 of file ResourceManagementSystem.inl.
◆ get()
const TResource * iv::ResourceManagementSystem::get | ( | ResourcePath | path | ) |
Definition at line 12 of file ResourceManagementSystem.inl.
◆ each_resource()
void iv::ResourceManagementSystem::each_resource | ( | std::function< void(ResourcePath const &path) > const & | f | ) |
Definition at line 57 of file ResourceManagementSystem.inl.
◆ register_provider()
void iv::ResourceManagementSystem::register_provider | ( | ResourceProvider * | provider, |
size_t | priority | ||
) |
Usage of providers has linear complexity, if a high number of providers would be used, this should be changed. If more providers have the same priority, then their order is undefined.
Provider registration and unregistration might be called from provider constructor / destructor, so virtual methods of provider should not be called right from this methods.
Definition at line 18 of file ResourceManagementSystem.cpp.
◆ unregister_provider()
void iv::ResourceManagementSystem::unregister_provider | ( | ResourceProvider * | provider | ) |
Definition at line 23 of file ResourceManagementSystem.cpp.
The documentation for this class was generated from the following files:
- ivorium_systems/ResourceManagementSystem/ResourceManagementSystem.hpp
- ivorium_systems/ResourceManagementSystem/ResourceManagementSystem.cpp
- ivorium_systems/ResourceManagementSystem/ResourceManagementSystem.inl