DataRegistry

TOC data

Interface
60000
Title
DataRegistry
Notes
Tracks shared data objects and notifies addons of changes to them.
Author
Predicate
X-Credits
Based on LibDataBroker-1.1 by tekkub.
LoadOnDemand
1
OptionalDeps
BlankSlate

Function Summary

DataRegistry.DataObjectIterator()
Iterates over registered data objects.
DataRegistry.DestroyDataObject(dataobject_or_name)
Destroys a registered data object.
DataRegistry.GetDataObjectByName(dataobjectname)
Retrieves a data object by name.
DataRegistry.GetNameByDataObject(dataobject)
Looks up the name of a data object.
DataRegistry.NewDataObject(name, dataobj)
Creates a new data object with the given name.
DataRegistry.ipairs(dataobject_or_name)
Iterates over the integer keys stored in a given data object.
DataRegistry.pairs(dataobject_or_name)
Iterates over the keys stored in a given data object.

Functions

DataRegistry.DataObjectIterator()

Iterates over registered data objects.

Parameters

Usage

Returns

  1. An iterator for registered data objects.

DataRegistry.DestroyDataObject(dataobject_or_name)

Destroys a registered data object. Fires a callback to inform listeners of the data object's destruction.

Parameters

DataRegistry.GetDataObjectByName(dataobjectname)

Retrieves a data object by name.

Parameters

Returns

  1. The data object registered by the given name, if found.

DataRegistry.GetNameByDataObject(dataobject)

Looks up the name of a data object.

Parameters

Returns

  1. The name of the data object, if found.

DataRegistry.NewDataObject(name, dataobj)

Creates a new data object with the given name. Fires a callback to inform listeners of the new data object. If a table is passed as the second arg, its values are stored in the new data object before the callback is fired.

Parameters

Returns

  1. The newly created object.

DataRegistry.ipairs(dataobject_or_name)

Iterates over the integer keys stored in a given data object. Use this instead of ipairs() on registered data objects.

Parameters

Returns

  1. An iterator for integer keys in the given data object.

DataRegistry.pairs(dataobject_or_name)

Iterates over the keys stored in a given data object. Use this instead of pairs() on registered data objects.

Parameters

Returns

  1. An iterator for keys in the given data object.