![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <CacheView.hpp>


Public Types | |
| using | ElementCacheT = CacheT |
| using | ElementT = typename ElementCacheT::ElementT |
| using | ElementKeyT = typename ElementCacheT::ElementKeyT |
| using | ElementCacheTraitsT = typename ElementCacheT::ElementCacheTraitsT |
| using | ElementPtrT = typename ElementCacheT::ElementPtrT |
| using | ElementObsT = typename ElementCacheT::ElementObsT |
| using | ElementContT = typename ElementCacheT::ElementContT |
| using | ElementInitialiserT = typename ElementCacheT::ElementInitialiserT |
| using | ElementCleanerT = typename ElementCacheT::ElementCleanerT |
| using | ElementMergerT = typename ElementCacheT::ElementMergerT |
Public Member Functions | |
| CacheViewT (castor::String const &name, ElementCacheT &cache, ElementInitialiserT initialise=[](ElementObsT const &){}, ElementCleanerT clean=[](ElementObsT const &){}) | |
| Constructor. More... | |
| ~CacheViewT ()=default | |
| Destructor. More... | |
| void | clear () |
| Removes from the cache the elements created through this view. More... | |
| template<typename ... ParametersT> | |
| ElementObsT | add (ElementKeyT const &name, ParametersT &&... params) |
| Creates an element with the given informations. More... | |
| template<typename ... ParametersT> | |
| ElementObsT | tryAdd (ElementKeyT const &name, bool initialise, ElementObsT &created, ParametersT &&... params) |
| Creates or retrieves an element with the given informations. More... | |
| bool | tryAdd (ElementKeyT const &name, ElementPtrT &element, bool initialise=false) |
| adds an already created an element. More... | |
| ElementObsT | add (ElementKeyT const &name, ElementPtrT &element, bool initialise=false) |
| adds an already created an element. More... | |
| bool | isEmpty () const |
| bool | has (ElementKeyT const &name) const |
| ElementObsT | tryFind (ElementKeyT const &name) const |
| Looks for an element with given name. More... | |
| ElementObsT | find (ElementKeyT const &name) const |
| Looks for an element with given name. More... | |
| ElementObsT | tryRemove (ElementKeyT const &name) |
| Removes an element, given a name. More... | |
| void | remove (ElementKeyT const &name) |
| Removes an object, given a name. More... | |
Iteration. | |
| auto | begin () |
| auto | begin () const |
| auto | end () |
| auto | end () const |
View on a resource cache.
| using castor3d::CacheViewT< CacheT, EventT >::ElementCacheT = CacheT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementCacheTraitsT = typename ElementCacheT::ElementCacheTraitsT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementCleanerT = typename ElementCacheT::ElementCleanerT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementContT = typename ElementCacheT::ElementContT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementInitialiserT = typename ElementCacheT::ElementInitialiserT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementKeyT = typename ElementCacheT::ElementKeyT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementMergerT = typename ElementCacheT::ElementMergerT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementObsT = typename ElementCacheT::ElementObsT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementPtrT = typename ElementCacheT::ElementPtrT |
| using castor3d::CacheViewT< CacheT, EventT >::ElementT = typename ElementCacheT::ElementT |
|
inline |
Constructor.
| [in] | name | The view name. |
| [in] | initialise | The element initialiser. |
| [in] | clean | The element cleaner. |
| [in] | cache | The viewed cache. |
|
default |
Destructor.
|
inline |
adds an already created an element.
| [in] | name | The element name. |
| [in] | element | The element. |
| [in] | initialise | Tells if the element is to be initialised after creation. |
|
inline |
Creates an element with the given informations.
| [in] | name | The element name. |
| [in] | params | The parameters forwarded to the viewed cache. |
|
inline |
|
inline |
|
inline |
Removes from the cache the elements created through this view.
|
inline |
|
inline |
|
inline |
Looks for an element with given name.
| [in] | name | The object name. |
|
inline |
| [in] | name | The object name. |
true if an element with given name exists.
|
inline |
true if the view is empty.
|
inline |
Removes an object, given a name.
| [in] | name | The object name. |
|
inline |
Creates or retrieves an element with the given informations.
| [in] | name | The element name. |
| [in] | initialise | Tells if the element is to be initialised after creation. |
| [out] | created | Receives the created element if ti was created. |
| [in] | params | The parameters forwarded to the viewed cache. |
|
inline |
adds an already created an element.
| [in] | name | The element name. |
| [in] | element | The element. |
| [in] | initialise | Tells if the element is to be initialised after creation. |
|
inline |
Looks for an element with given name.
| [in] | name | The object name. |
|
inline |
Removes an element, given a name.
| [in] | name | The element name. |