ArrayProperty extends Property with an array access operator, for properties which behave like C arrays or collections.
More...
#include <VIBProperties.h>
|
|
| ArrayProperty () |
| | Default constructor, you must initialize get and set later.
|
| |
| | ArrayProperty (const Getter &pGet, const Setter &pSet) |
| | Provide get and set callbacks at instantiation.
|
| |
| A | operator[] (int i) |
| | Array access operator.
|
| |
| | Property () |
| | Default constructor, you must initialize get and set later.
|
| |
| | Property (const Getter &pGet, const Setter &pSet) |
| | Full constructor.
|
| |
| void | initCallbacks (const Getter &pGet, const Setter &pSet) |
| | Late-initialize the callbacks, or change their values at runtime.
|
| |
| | operator T () |
| | Cast operator, invokes get() and returns its value.
|
| |
| Property< T > & | operator= (const T &nv) |
| | Assignment operator, invokes set with the provided value, returns this object.
|
| |
| T | operator-> () |
| | Invokes get, assuming it returns a pointer that can be used with the deref-access arrow operator.
|
| |
|
|
typedef std::function< T(void)> | Getter |
| | The type of a Property Getter method.
|
| |
typedef std::function< void(const
T &)> | Setter |
| | The type of a Property Setter method.
|
| |
|
Getter | get |
| | The getter method; typically, a this-capturing lambda function.
|
| |
|
Setter | set |
| | The setter method; typically, a this-capturing lambda function.
|
| |
template<typename T, typename A>
class VIB::ArrayProperty< T, A >
ArrayProperty extends Property with an array access operator, for properties which behave like C arrays or collections.
It is possible to use this recursively to create multidimensional property arrays.
- Template Parameters
-
| T | Basic type or structure/class type to wrap. |
- Parameters
-
| A | Basic type or structure/class type of elements in the array. |
template<typename T, typename A>
Provide get and set callbacks at instantiation.
- Parameters
-
| [in] | pGet | Pointer to a getter function; typically, a this-capturing lambda. |
| [in] | pSet | Pointer to a setter function; typically, a this-capturing lambda. |
template<typename T, typename A>
Array access operator.
Calls the getter callback of this object, and then invokes the underlying object's operator [] using the input index. It must return template type A.
- Parameters
-
| [in] | i | Index of the item in the array to obtain. |
The documentation for this class was generated from the following file: