#include <VirtualResourceProvider.hpp>
Public Member Functions | |
VirtualResourceProvider (Instance *inst, size_t priority) | |
virtual void | each_type (std::function< void(std::type_index type) > const &) override |
virtual bool | has_path (ResourcePath const &path, std::type_index type) override |
virtual void | each_resource (std::type_index type, std::function< void(ResourcePath const &) > const &) override |
virtual std::pair< void *, Instance * > | create_resource (ResourcePath const &path, std::type_index type, ResourcesRoot *parent) override |
Instance * | instance () const |
Static Public Member Functions | |
template<class TVirtualSubprovider , class TClient , class TParserClient = TClient> | |
static void | RegisterType () |
static void | UnregisterAllTypes () |
Public Attributes | |
ClientMarker | cm |
Detailed Description
If the path exists dependends on the resource implementation. This can be used for example if whole directory is a resource or just part of the path.
Definition at line 15 of file VirtualResourceProvider.hpp.
Constructor & Destructor Documentation
◆ VirtualResourceProvider()
iv::VirtualResourceProvider::VirtualResourceProvider | ( | Instance * | inst, |
size_t | priority | ||
) |
Definition at line 17 of file VirtualResourceProvider.cpp.
Member Function Documentation
◆ RegisterType()
|
static |
Definition at line 5 of file VirtualResourceProvider.inl.
◆ UnregisterAllTypes()
|
static |
Definition at line 8 of file VirtualResourceProvider.cpp.
◆ each_type()
|
overridevirtual |
Implements iv::ResourceProvider.
Definition at line 53 of file VirtualResourceProvider.cpp.
◆ has_path()
|
overridevirtual |
First check for ability to create instance. If this returns true, instance creation might still fail (parsing error) but no other provider will try to instantiate it. Only resource provider with highest priority that returns true here will try to instantiate it. This ResourceProvider must not be removed from ResourceManagementSystem during this method call.
Implements iv::ResourceProvider.
Definition at line 24 of file VirtualResourceProvider.cpp.
◆ each_resource()
|
overridevirtual |
Implements iv::ResourceProvider.
Definition at line 40 of file VirtualResourceProvider.cpp.
◆ create_resource()
|
overridevirtual |
Is not called if create_instance_async was called on the same path and type before. Should return void pointer to instance of type indentified by argument 'type' and its associated Instance that owns it (for memory management).
Implements iv::ResourceProvider.
Definition at line 62 of file VirtualResourceProvider.cpp.
◆ instance()
Instance * iv::ResourceProvider::instance |
Definition at line 21 of file ResourceProvider.cpp.
Member Data Documentation
◆ cm
ClientMarker iv::VirtualResourceProvider::cm |
Definition at line 19 of file VirtualResourceProvider.hpp.
The documentation for this class was generated from the following files:
- ivorium_systems/ResourceManagementSystem/VirtualResource/VirtualResourceProvider.hpp
- ivorium_systems/ResourceManagementSystem/VirtualResource/VirtualResourceProvider.cpp
- ivorium_systems/ResourceManagementSystem/VirtualResource/VirtualResourceProvider.inl