Base class for graphics plugin objects.
More...
#include <GraphicsPluginObject.h>
|
virtual void | Destroy () override |
| /!\ THIS FUNCTION MUST BE CALLED FOR DESTRUCTION, DO NOT USE delete
|
|
| PluginObject (const PluginType type) |
|
PluginType | GetType () const override |
|
template<class T > |
T * | DAs () |
|
template<class T > |
const T * | DAs () const |
|
|
static void | _SetInCache (const std::string &path, const SPtr< GraphicsCachedResource > &object) |
| Sets an object in the cache.
|
|
static void | _SetCacheSize (size_t size) |
| Adds cache size to avoid unnecessary additional allocations.
|
|
static void | _AddCacheSize (size_t size) |
| Adds cache size to avoid unnecessary additional allocations.
|
|
Base class for graphics plugin objects.
- Warning
- DO NOT INHERIT with GraphicsCachedResource
◆ _AddCacheSize()
void venom::common::GraphicsPluginObject::_AddCacheSize |
( |
size_t | size | ) |
|
|
staticprotected |
Adds cache size to avoid unnecessary additional allocations.
- Parameters
-
◆ _SetCacheSize()
void venom::common::GraphicsPluginObject::_SetCacheSize |
( |
size_t | size | ) |
|
|
staticprotected |
Adds cache size to avoid unnecessary additional allocations.
- Parameters
-
◆ _SetInCache()
void venom::common::GraphicsPluginObject::_SetInCache |
( |
const std::string & | path, |
|
|
const SPtr< GraphicsCachedResource > & | object ) |
|
staticprotected |
Sets an object in the cache.
- Parameters
-
- Warning
path
must be the original asset path relative to the resources
folder
- Parameters
-
◆ Destroy()
void venom::common::GraphicsPluginObject::Destroy |
( |
| ) |
|
|
overridevirtual |
◆ GetCachedObject()
std::shared_ptr< GraphicsCachedResource > venom::common::GraphicsPluginObject::GetCachedObject |
( |
const std::string & | path | ) |
|
|
static |
Gets a cached object from the graphics cache.
- Parameters
-
path | (to the original asset) |
- Warning
path
must be the original asset path relative to the resources
folder
- Returns
- nullptr if the object is not in cache, the object otherwise
◆ GetCachedObjects()
const std::unordered_map< std::string, std::shared_ptr< GraphicsCachedResource > > & venom::common::GraphicsPluginObject::GetCachedObjects |
( |
| ) |
|
|
static |
Gets all cached objects.
- Returns
- cached objects
◆ HasCachedObject()
bool venom::common::GraphicsPluginObject::HasCachedObject |
( |
const std::string & | path | ) |
|
|
static |
Checks if an object is in the cache.
- Parameters
-
path | relative path to the asset |
- Returns
- true if found in the cache
The documentation for this class was generated from the following files: