ObjectList

object list holder, owning its objects - on destroy of holder, all own objects will be destroyed

Destructor

~this
~this()

destructor destroys all items

Members

Aliases

length
alias length = count
Undocumented in source.

Functions

add
T add(T item)

add item to list

asArray
T[] asArray()

Get items array slice. Don't try to resize it!

clear
void clear(bool destroyObj)

remove and destroy all items

get
inout(T) get(int index)

get item by index

indexOf
int indexOf(T item)

find child index for item, return -1 if not found

indexOf
int indexOf(string id)

find child index for item by id, return -1 if not found

insert
T insert(T item, int index)

add item to list

opApply
int opApply(int delegate(ref T) callback)

Support foreach

opIndex
T opIndex(int index)

get item by index

remove
T remove(int index)

remove item from list, return removed item

replace
void replace(T item, int index)

Replace item with another value, destroy old value.

replace
void replace(T newItem, T oldItem)

Replace item with another value, destroy old value.

Properties

count
int count [@property getter]

returns count of items

Variables

_count
int _count;
Undocumented in source.
_list
T[] _list;
Undocumented in source.

Meta