Resource template.
More...
#include <Resource.h>
List of all members.
Detailed Description
template<class AType>
class PLCore::Resource< AType >
Resource template.
Constructor & Destructor Documentation
Member Function Documentation
Returns the resource manager using this resource.
- Returns:
- Resource manager using this resource or a null pointer
Returns the unique resource name.
- Returns:
- Unique resource name
- Note:
- Because within a resource manager a resource is managed using it's name, this resource name MUST be unique!
Returns whether the resource is protected or not.
- Returns:
- 'true' if the resource is protected, else 'false'
- Note:
- Protected resource are only removed if their manager is cleared!
Sets whether the resource is protected or not.
- Parameters:
-
[in] | bProtected | Is the resource protected? |
- See also:
-
Returns the ID of the resource within the resource manager.
- Returns:
- ID of the resource within the resource manager, -1 if there was an error (maybe this resource is not within a resource manager)
- Note:
- The resource ID isn't fixed, if you remove some resources from the manager it's possible that the resource ID is changed!
Returns the number of resource handlers.
- Returns:
- The number of resource handlers
- Note:
- The handlers will be informed if the resource was lost
Returns a resource handler.
- Parameters:
-
[in] | nIndex | Index of the resource handler to return |
- Returns:
- The requested resource handler, a null pointer on error
Destroys the resource.
- Parameters:
-
[in] | bProtectedToo | Do also destroy the resource if it is protected? |
- Returns:
- 'true' if all went fine, else 'false' (maybe the resource is protected?)
- Note:
- Whether the resource is destroyed within this function or just added for instance to a kind of 'destruction list' is implementation dependent.
Sets the resource name.
Sets the unique resource name.
- Parameters:
-
[in] | sName | New resource name |
- Returns:
- 'true' if all went fine, else 'false' (maybe the name is already used)
- See also:
-
- Note:
- Overload this function if it's for instance not allowed to change the name of the resource
Copy operator.
- Parameters:
-
[in] | cSource | Source to copy from |
- Returns:
- This instance
- Note:
- Manager, handlers and name are not copied
Member Data Documentation
Is the resource protected?
The documentation for this class was generated from the following files: