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 * | As () |
| |
|
template<class T> |
| const T * | As () const |
| |
|
template<class T> |
| T * | ConstAs () const |
| |
|
template<class T> |
| T * | RAs () |
| |
|
template<class T> |
| const T * | RAs () const |
| |
|
template<class T> |
| T * | DAs () |
| |
|
template<class T> |
| const T * | DAs () const |
| |
|
void | IncRefCount () |
| |
|
void | DecRefCount () |
| |
|
| static void | _SetInCache (const vc::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 vc::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()
| vc::SPtr< GraphicsCachedResource > venom::common::GraphicsPluginObject::GetCachedObject |
( |
const vc::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 vc::UMap< vc::String, vc::SPtr< GraphicsCachedResource > > & venom::common::GraphicsPluginObject::GetCachedObjects |
( |
| ) |
|
|
static |
Gets all cached objects.
- Returns
- cached objects
◆ HasCachedObject()
| bool venom::common::GraphicsPluginObject::HasCachedObject |
( |
const vc::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: