RuntimeDataObjectList¶
-
class
kanzi::connect
::
RuntimeDataObjectList
: public RuntimeDataObject¶ RuntimeDataObject list is used to hold list of information.
Public Functions
-
inline explicit
RuntimeDataObjectList
(ConnectDomain *domain, const string &name, const string nameOverride = "")¶ Standard constructor.
- Parameters
name – Name of the data object.
-
inline explicit
RuntimeDataObjectList
(ConnectDomain *domain, const string &path, const string &name, const string nameOverride)¶ Standard constructor.
- Parameters
path – Path that contains names of the parents separated with ‘.’
name – Name of the data object.
Adds an item to the end of the list.
- Parameters
item – the item to add
-
inline virtual RuntimeDataObjectSharedPtr clone () KZ_OVERRIDE
Clone the object as is.
- Returns
exact clone of the object that was being called to.
-
virtual RuntimeDataObjectSharedPtr
createItem
()¶ Creates a new item based on stored item schema, or in case not present, from the first item stored currently in the list.
- Returns
newly allocate item tree with default values.
-
virtual RuntimeDataObjectSharedPtr
createItemInplace
()¶ Creates a list item and inserts it to the end of the list.
- Returns
newly allocated object.
-
void
disableModificationNotifications
()¶ Disables modification notifications.
-
int
enableModificationNotifications
()¶ Enables modification notifications.
- Returns
the amount of modification requests received while those were disabled.
-
virtual bool equals (RuntimeDataObjectSharedPtr other) KZ_OVERRIDE
Comparison.
- Parameters
other – to be compared with
- Returns
true if equals
-
virtual RuntimeDataObjectSharedPtr
getItem
(size_t index)¶ Get item at specific position.
- Parameters
index – the position of item
- Returns
pointer to object
-
inline RuntimeDataObjectSharedPtr
getTemplateItem
() const¶ Retrieve template item.
- Returns
the template item.
-
inline virtual Type getType () const KZ_OVERRIDE
Retrieves the type of this data object.
- Returns
Type enumeration of this data object.
-
inline shared_ptr<DataObject>
getUITemplateItem
() const¶ Gets UI template item.
- Returns
template item.
Inserts item into requested position.
If position is invalid then object is put to the end.
- Parameters
position – position where to put the item into.
-
virtual size_t
itemCount
()¶ return amount of items currently in list
- Returns
amount of elements.
-
virtual void removeAllChildren () KZ_OVERRIDE
Remove all list items under this.
-
virtual void removeChild (const RuntimeDataObject &child) KZ_OVERRIDE
Remove a list item under this.
- Parameters
child – The item to remove
-
virtual void removeChild (size_t index) KZ_OVERRIDE
Remove a list item within this.
- Parameters
index – Identifies the item to remove
-
virtual void
removeItem
(size_t index)¶ Release item at given position within the list.
- Parameters
index – item position.
-
virtual void
removeListItems
()¶ Remove all list items under this.
-
void
resizeTo
(size_t size)¶ Resizes the list to specific size.
- Parameters
size – the new size for list.
-
bool
setSerializedJsonValues
(const string &valueList)¶ Set the list values from json data.
- Parameters
valueList – Contains the values to set in json format
Save the template item used to factorize objects.
- Parameters
tmpl – template object
Sets UI template item.
- Parameters
item – the template item
-
inline explicit