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.

virtual void appendItem(RuntimeDataObjectSharedPtr item)

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.

Return

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.

Return

newly allocate item tree with default values.

virtual RuntimeDataObjectSharedPtr createItemInplace()

Creates a list item and inserts it to the end of the list.

Return

newly allocated object.

void disableModificationNotifications()

Disables modification notifications.

int enableModificationNotifications()

Enables modification notifications.

Return

the amount of modification requests received while those were disabled.

virtual bool equals (RuntimeDataObjectSharedPtr other) KZ_OVERRIDE

Comparison.

Return

true if equals

Parameters
  • other: to be compared with

virtual RuntimeDataObjectSharedPtr getItem(size_t index)

Get item at specific position.

Return

pointer to object

Parameters
  • index: the position of item

inline RuntimeDataObjectSharedPtr getTemplateItem() const

Retrieve template item.

Return

the template item.

inline virtual Type getType () const KZ_OVERRIDE

Retrieves the type of this data object.

Return

Type enumeration of this data object.

inline shared_ptr<DataObject> getUITemplateItem() const

Gets UI template item.

Return

template item.

virtual void insertItem(RuntimeDataObjectSharedPtr item, size_t position)

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

Return

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

inline void setTemplateItem(RuntimeDataObjectSharedPtr tmpl)

Save the template item used to factorize objects.

Parameters
  • tmpl: template object

inline void setUITemplateItem(shared_ptr<DataObject> item)

Sets UI template item.

Parameters
  • item: the template item