![]() |
Max OS 0.3
|
A resource registry for a specific resource type. More...
#include <resource.h>
Public Member Functions | |
| ResourceRegistry (resource_type_t type) | |
| Constructor for ResourceRegistry of a specific type. | |
| Resource * | create_resource (const string &name, size_t flags) override |
| Create a new resource of the specific type. | |
Public Member Functions inherited from MaxOS::processes::BaseResourceRegistry | |
| BaseResourceRegistry (resource_type_t type) | |
| Constructs a new BaseResourceRegistry object and registers it globally. | |
| ~BaseResourceRegistry () | |
| Destructor for BaseResourceRegistry, removes it from the global list. | |
| resource_type_t | type () |
| Gets the type of resources this registry handles. | |
| virtual Resource * | get_resource (const string &name) |
| Gets a resource from the registry by name. | |
| virtual bool | register_resource (Resource *resource) |
| Registers a resource in the registry. | |
| virtual void | close_resource (Resource *resource, size_t flags) |
| Close the resource provided, if it exists in this registry. | |
Additional Inherited Members | |
Protected Attributes inherited from MaxOS::processes::BaseResourceRegistry | |
| common::Map< string, Resource * > | m_resources |
| The map of resource names to resource instances. | |
| common::Map< string, uint64_t > | m_resource_uses |
| The map of resource names to how many processes are using them. | |
| resource_type_t | m_type |
| The resource type that this registry manages. | |
A resource registry for a specific resource type.
| Type | The resource type that this registry manages |
Definition at line 81 of file resource.h.
|
explicit |
Constructor for ResourceRegistry of a specific type.
| Type | The resource type that this registry manages |
| type | The resource type enum value |
Definition at line 114 of file resource.h.
|
inlineoverridevirtual |
Create a new resource of the specific type.
| name | The name of the resource |
| flags | The flags to open the resource with |
Reimplemented from MaxOS::processes::BaseResourceRegistry.
Definition at line 94 of file resource.h.
References MaxOS::processes::BaseResourceRegistry::register_resource(), and MaxOS::processes::BaseResourceRegistry::type().