|
0.45.0
|
Item holding generic data and other items. More...
#include <iItem.h>
Public Member Functions | |
| iItem ()=default | |
| template<typename T > | |
| void | setValue (const iaString &key, const T &value) |
| template<typename T > | |
| T | getValue (const iaString &key) const |
| bool | hasValue (const iaString &key) const |
| const iaString | getID () const |
| iItemPtr | addItem (const iaString &id) |
| void | removeItem (iItemPtr item) |
| const std::vector< iItemPtr > | getItems () const |
| iItemPtr | getParent () const |
| void | clear () |
| bool | operator== (const iItem &other) const |
| bool | operator!= (const iItem &other) const |
| bool | hasData () const |
| template<> | |
| void | setValue (const iaString &key, const iaString &value) |
| template<> | |
| iaString | getValue (const iaString &key) const |
| template<> | |
| void | setValue (const iaString &key, const iaUUID &value) |
| template<> | |
| iaUUID | getValue (const iaString &key) const |
| template<> | |
| void | setValue (const iaString &key, const bool &value) |
| template<> | |
| bool | getValue (const iaString &key) const |
| template<> | |
| void | setValue (const iaString &key, const uint64 &value) |
| template<> | |
| uint64 | getValue (const iaString &key) const |
Item holding generic data and other items.
Useful for small hierarchies since all data is copied a lot
|
default |
nothing to do
adds item to this item
this item retains ownership
| id | if of the item (must be unique between siblings) |
| void igor::iItem::clear | ( | ) |
clear item and it's children
| const iaString igor::iItem::getID | ( | ) | const |
it's a unique id amongst siblings
| const std::vector< iItemPtr > igor::iItem::getItems | ( | ) | const |
| iItemPtr igor::iItem::getParent | ( | ) | const |
| T igor::iItem::getValue | ( | const iaString & | key | ) | const |
key "name" is a reserved key. Every item has a name
| key | the given key |
|
inline |
|
inline |
|
inline |
|
inline |
| bool igor::iItem::hasData | ( | ) | const |
| bool igor::iItem::hasValue | ( | const iaString & | key | ) | const |
| bool igor::iItem::operator!= | ( | const iItem & | other | ) | const |
compare two items recursively for being not equal
| other | the other item |
| bool igor::iItem::operator== | ( | const iItem & | other | ) | const |
compare two items recursively for being equal
| other | the other item |
| void igor::iItem::removeItem | ( | iItemPtr | item | ) |
removes given item from this item
| item | the item to remove |
|
inline |
|
inline |
|
inline |
| void igor::iItem::setValue | ( | const iaString & | key, |
| const T & | value | ||
| ) |
set value for given key
key "name" is a reserved key. Every item has a name
| key | to set |
| value | to set |
|
inline |