⁘ data.core.catalog

Catalog

go to → Members

Extends

Searching

Methods

FindDataHolders(p_data, p_resultsopt)

TODO // Replace with Filter

Parameters:
Name Type Attributes Default Description
p_data *
p_results array <optional>
null

FindFirstByOptionValue(p_key, p_value)

TODO // Replace with Filter

Parameters:
Name Type Description
p_key string
p_value *

FindFirstDataByStringID(p_stringID)

TODO // Replace with Filter

Parameters:
Name Type Description
p_stringID string

FindFirstDataHolder(p_data)

TODO // Replace with Filter

Parameters:
Name Type Description
p_data *
Sorting

Members

autoSort :boolean

TODO

defaultSortFunc :function

TODO

Methods

Sort(p_options)

Sort this Catalog based on sorting options. Format : { id:'id to look for and test (optional)', fn:'sorting function' }. Triggers a 'SORTED' signal if the Catalog has been effectively sorted.

Parameters:
Name Type Default Description
p_options object null

Optional sorting options

Properties
Name Type Description
fn function

sorting function

id string

option id to check

Broadcasting

This section list the main methods used to watch/unwatch signals on this object. For more info on signals, see signals

Methods

Unwatch(p_signal, p_fn, p_listener) → {common.pool.DisposableObjectEx}

Inherited From:

Watch(p_signal, p_fn, p_listener) → {common.pool.DisposableObjectEx}

Inherited From:

WatchOnce(p_signalId, p_fn, p_listener) → {common.pool.DisposableObjectEx}

Inherited From:

protected_Broadcast(p_signal, …args)

Inherited From:
Initialization

Methods

protectedoverride-me_Init()

Inherited From:

protectedoverride-me_PostInit()

Inherited From:
Utils

Methods

protected_Bind(p_func)

Inherited From:
Pooling

Group of methods related to the NKMjs pooling system.

Members

read-onlyisReleasing :boolean

Inherited From:

Methods

Release()

Inherited From:

protectedoverride-me_CleanUp()

Inherited From:
Misc

Members

autoRelease :boolean

Inherited From:

read-onlycount :number

TODO

data :core.data.DataBlock

Inherited From:

dataBound :boolean

Inherited From:

expanded :boolean

TODO

read-onlyisDir :boolean

Inherited From:

name :string

Inherited From:

options :object

Inherited From:

path :string

Inherited From:

Methods

Add(p_item) → {data.core.CatalogItem|data.core.Catalog}

Add the specified item to this catalog

Parameters:
Name Type Description
p_item data.core.CatalogItem | data.core.Catalog

AddCommand(p_cmd)

Inherited From:

AppendOptions(p_options)

Inherited From:

At(p_index) → {data.core.catalog.CatalogItem|data.core.catalog.Catalog}

TODOReturns the item at the specified position in this catalog.

Parameters:
Name Type Description
p_index number

the item's index.

Clear()

Clears the catalog and releases all items

ForEach(p_fn, p_thisArgopt, p_reverseopt)

Loops through all items in Catalog. Callback should match the signature : (item, index)

Parameters:
Name Type Attributes Default Description
p_fn function
p_thisArg object <optional>
null
p_reverse boolean <optional>
false

GetOption(p_id, p_fallback)

Inherited From:

GetOrCreateCatalog(p_options) → {data.core.catalog.Catalog}

Gets or create a catalog inside this one using the specified options

Parameters:
Name Type Description
p_options CatalogItemOptions

GetOrSetOption(p_id, p_fallback)

Inherited From:

PreventRelease()

Inherited From:

Register(p_itemInfos) → {data.core.catalog.CatalogItem|data.core.catalog.Catalog}

Create a catalog item given the specified item infos.

Parameters:
Name Type Description
p_itemInfos CatalogItemOptions

Remove(p_item)

Removes the specified item from this catalog

Parameters:
Name Type Description
p_item data.core.CatalogItem

Resolve(p_path, p_fromopt)

Resolve the specified path and return the item if it exists.

Parameters:
Name Type Attributes Default Description
p_path string | array
p_from number <optional>
0

SetOption(p_id, p_value)

Inherited From:

debugStructToString(p_stringopt, p_depthopt)

TODO

Parameters:
Name Type Attributes Default Description
p_string string <optional>
null
p_depth number <optional>
null

Members

write-onlyprotectedrootCatalog :data.core.Catalog

Overrides:

TODO

protectedrootDistance :number

Inherited From:

Methods

protected_OnDataChanged(p_newData, p_oldData)

Inherited From:

protected_OnDataReleased(p_data)

Inherited From:

protected_OnItemAdded(p_item)

Callback when an item has been added to the catalog

Parameters:
Name Type Description
p_item data.core.CatalogItem | data.core.Catalog

protected_OnItemReleased(p_item)

Callback when an item has been released

Parameters:
Name Type Description
p_item data.core.CatalogItem | data.core.Catalog

protected_OnItemRemoved(p_item)

Callback when an item is removed from this catalog

Parameters:
Name Type Description
p_item data.core.CatalogItem

protected_OnOptionsUpdated(p_options)

Inherited From:

protected_OnOptionsWillUpdate(p_options)

TODO

Parameters:
Name Type Description
p_options object

protected_OnUpdate()

Inherited From:

staticCreateFrom(p_rootOptions, p_contentopt, p_parentopt) → {data.core.Catalog}

Creates a Catalog from a mockup object.

Parameters:
Name Type Attributes Default Description
p_rootOptions CatalogItemOptions
p_content * <optional>
null
p_parent * <optional>
null

staticGetItemClass(p_itemOptions, p_forceCatalogopt) → {constructor}

Find a suitable item class based on provided options

Parameters:
Name Type Attributes Default Description
p_itemOptions object
p_forceCatalog boolean <optional>
false

staticPathInfos(p_path)

Parse a string to a catalog-friendly format

Parameters:
Name Type Description
p_path string