Castor3D
..
|
Base class for an element manager. More...
Public Types | |
typedef Castor::Collection< Elem, Key > | Collection |
Public Member Functions | |
void | Cleanup () |
Sets all the elements to be cleaned up. More... | |
void | Clear () |
Flushes the collection. More... | |
bool | IsEmpty () |
void | Insert (Key const &p_name, std::shared_ptr< Elem > p_element) |
Removes an object, given a name. More... | |
void | Remove (Key const &p_name) |
Removes an object, given a name. More... | |
void | SetRenderSystem (RenderSystem *p_renderSystem) |
RenderSystem * | SetRenderSystem () const |
Engine * | GetEngine () const |
Castor::String const & | GetObjectTypeName () const |
bool | Has (Key const &p_name) const |
std::shared_ptr< Elem > | Find (Key const &p_name) const |
Looks for an element with given name. More... | |
void | lock () const |
Locks the collection mutex. More... | |
void | unlock () const |
Unlocks the collection mutex. More... | |
Collection::TObjPtrMapIt | begin () |
Returns an iterator to the first element of the collection. More... | |
Collection::TObjPtrMapConstIt | begin () const |
Returns an constant iterator to the first element of the collection. More... | |
Collection::TObjPtrMapIt | end () |
Returns an iterator to the after last element of the collection. More... | |
Collection::TObjPtrMapConstIt | end () const |
Returns an constant iterator to the after last element of the collection. More... | |
template<typename ... Parameters> | |
std::shared_ptr< Elem > | Create (Key const &p_name, Parameters &&... p_params) |
Creates an object. More... | |
Protected Member Functions | |
Manager (Owner &p_owner) | |
Constructor. More... | |
~Manager () | |
Destructor. More... | |
Protected Attributes | |
RenderSystem * | m_renderSystem |
The RenderSystem. More... | |
Collection | m_elements |
The elements collection. More... | |
Base class for an element manager.
typedef Castor::Collection< Elem, Key > Castor3D::Manager< Key, Elem, Owner, EngineGetter >::Collection |
|
inlineprotected |
Constructor.
[in] | p_owner | The owner. |
|
inlineprotected |
Destructor.
|
inline |
Returns an iterator to the first element of the collection.
|
inline |
Returns an constant iterator to the first element of the collection.
|
inline |
Sets all the elements to be cleaned up.
|
inline |
Flushes the collection.
Referenced by Castor3D::ObjectManager< Castor::String, AnimatedObjectGroup >::MergeInto().
|
inline |
Creates an object.
[in] | p_name | The object name. |
[in] | p_params | The other constructor parameters. |
|
inline |
Returns an iterator to the after last element of the collection.
|
inline |
Returns an constant iterator to the after last element of the collection.
|
inline |
Looks for an element with given name.
[in] | p_name | The object name. |
|
inline |
Referenced by Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Cleanup(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Create(), and Castor3D::ObjectManagerEngineGetter::Get().
|
inline |
Referenced by Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Create(), and Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Insert().
|
inline |
[in] | p_name | The object name. |
true
if an element with given name exists.
|
inline |
Removes an object, given a name.
[in] | p_name | The element name. |
[in] | p_element | The element. |
|
inline |
true
if the manager is empty.
|
inline |
Locks the collection mutex.
|
inline |
Removes an object, given a name.
[in] | p_name | The object name. |
|
inline |
[in] | p_renderSystem | The RenderSystem. |
|
inline |
|
inline |
Unlocks the collection mutex.
|
mutableprotected |
The elements collection.
Referenced by Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::begin(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Cleanup(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Clear(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Create(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::end(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Find(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Has(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Insert(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::IsEmpty(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::lock(), Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::Remove(), and Castor3D::Manager< Castor::String, Sampler, Engine, ResourceManagerEngineGetter >::unlock().
|
protected |