#include <Heap.hpp>
|
| Heap (Instance *inst=nullptr, ClientMarker *cm=nullptr) |
|
| ~Heap () |
|
template<class T > |
void | destroy (T *) |
|
void | clear () |
|
template<class T , class ... CArgs> |
T * | create (CArgs const &...) |
|
template<class T , class ... CArgs> |
T * | createInstance (std::string const &name, CArgs const &...) |
|
template<class T , class ... CArgs> |
T * | createClient (CArgs const &...) |
|
template<class T , class ... CArgs> |
T * | create (CArgs const &... cargs) |
|
template<class T , class ... CArgs> |
T * | createInstance (std::string const &name, CArgs const &... cargs) |
|
template<class T , class ... CArgs> |
T * | createClient (CArgs const &... cargs) |
|
All instances created by Heap will be deleted in Heap destructor.
Definition at line 13 of file Heap.hpp.
◆ Heap()
inst
Default instance that will be used as parent when creating new instances using Heap::createInst. If this is nullptr, then createInst should not be used. cm
Client that will be parent of new clients created with Heap::createClient. This client should be client in Instance given as first parameter.
Definition at line 6 of file Heap.cpp.
◆ ~Heap()
◆ destroy()
template<class T >
void iv::Heap::destroy |
( |
T * |
ptr | ) |
|
Deletes any object created by this Heap, otherwise emmits warning. Works as operator delete, so for example polymorphic objects can be destroyed using typed pointer to its parent.
Definition at line 45 of file Heap.inl.
◆ clear()
Deletes everything in reverse order than in which it was created.
Definition at line 19 of file Heap.cpp.
◆ create() [1/2]
template<class T , class ... CArgs>
T* iv::Heap::create |
( |
CArgs const & |
... | ) |
|
Creates instance of T using operator new and constructor T::T( CArgs const & );
◆ createInstance() [1/2]
template<class T , class ... CArgs>
T* iv::Heap::createInstance |
( |
std::string const & |
name, |
|
|
CArgs const & |
... |
|
) |
| |
Asserts that Instance passed to constructor is not nullptr. Creates child instance with given name and creates root client for it.
Type T must comply with Client concept: T::T( Instance *, Cargs ... ); Instance * T::instance() const; ClientMarker T::cm;
◆ createClient() [1/2]
template<class T , class ... CArgs>
T* iv::Heap::createClient |
( |
CArgs const & |
... | ) |
|
◆ create() [2/2]
template<class T , class ... CArgs>
T* iv::Heap::create |
( |
CArgs const &... |
cargs | ) |
|
◆ createInstance() [2/2]
template<class T , class ... CArgs>
T* iv::Heap::createInstance |
( |
std::string const & |
name, |
|
|
CArgs const &... |
cargs |
|
) |
| |
◆ createClient() [2/2]
template<class T , class ... CArgs>
T* iv::Heap::createClient |
( |
CArgs const &... |
cargs | ) |
|
The documentation for this class was generated from the following files: