Component class is a container for CVB objects. More...
#include <cvb/composite.hpp>
Public Member Functions | |
void * | Handle () const noexcept |
Classic API node handle. More... | |
CompositePurpose | Purpose () const noexcept |
Gets the purpose of this Composite. More... | |
bool | ContainsItem (const CompositeVariant &item) const noexcept |
Checks whether item is in this Composite. More... | |
int | ItemCount () const noexcept |
Number of variants in the composite. More... | |
void | InsertItemAt (int index, const CompositeVariant &item) |
Insert a composite item specified at given index. More... | |
void | PushBackItem (const CompositeVariant &item) |
Appends a composite item. More... | |
CompositeVariant | ItemAt (int index) const |
Access to a composite item specified by its index. More... | |
void | RemoveItemAt (int index) |
Remove a composite item specified by its index. More... | |
Static Public Member Functions | |
static std::unique_ptr< Composite > | Create (CompositePurpose purpose=CompositePurpose::Custom) |
Creates a composite with the given optional parameter. More... | |
static std::unique_ptr< Composite > | FromHandle (HandleGuard< Composite > &&guard) |
Creates a composite from a classic API handle. More... | |
template<class T > | |
static CompositePtr | FromObject (std::shared_ptr< T > object) |
Returns a composite object from the given composite compatible object. More... | |
Component class is a container for CVB objects.
|
inlinenoexcept |
Checks whether item is in this Composite.
|
inlinestatic |
Creates a composite with the given optional parameter.
[in] | purpose | The purpose of this container. |
Any | exception derived from std::exception including CvbException. |
|
inlinestatic |
Creates a composite from a classic API handle.
[in] | guard | Life time guard for C-API handle. |
Any | exception derived from std::exception including CvbException. |
The composite takes ownership of the handle, so you must share it before using this function.
|
static |
Returns a composite object from the given composite compatible object.
[in] | object | A composite compatible object to share. |
|
inlinenoexcept |
Classic API node handle.
Does | not throw any exception. |
It is normally not necessary to work with this handle.
|
inline |
Insert a composite item specified at given index.
[in] | index | Item index to insert the composite item at given index. |
[in] | item | The composite item to insert. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Access to a composite item specified by its index.
[in] | index | Item index of the composite item to access. |
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
Number of variants in the composite.
Does | not throw any exception. |
|
inlinenoexcept |
Gets the purpose of this Composite.
|
inline |
Appends a composite item.
[in] | item | The composite item to append. |
Any | exception derived from std::exception including CvbException. |
|
inline |
Remove a composite item specified by its index.
[in] | index | Item index of the composite item to remove. |
Any | exception derived from std::exception including CvbException. |