Murl Engine Lua Addon API  Version 1.0 beta
Murl.SharedArray.Float

A proxy class contaning a shared pointer to an array.

The copy constructor copies the object itself (the shared pointer). The assignment operator copies the content of the object.

See Murl::Array for method documentation.


Table members

Inherited


Murl.Array.Float

Typedefs


Murl.SharedArray.Float.ArrayType

The array type definition.

Returns
Murl.Array.Float


Functions


Murl.SharedArray.Float.new()

Forward to Array::Array() constructor.

Murl.SharedArray.Float new()

Returns
Murl.SharedArray.Float

Murl.SharedArray.Float.new(item)

Forward to Array::Array(const DataType& item) constructor.

Murl.SharedArray.Float new(Number item)

Parameters
itemThe item.
Returns
Murl.SharedArray.Float

Murl.SharedArray.Float.new(item1, item2)

Forward to Array::Array(const DataType& item1, const DataType& item2) constructor.

Murl.SharedArray.Float new(Number item1, Number item2)

Parameters
item1The first item.
item2The second item.
Returns
Murl.SharedArray.Float

Murl.SharedArray.Float.new(item1, item2, item3)

Forward to Array::Array(const DataType& item1, const DataType& item2, const DataType& item3) constructor.

Murl.SharedArray.Float new(Number item1, Number item2, Number item3)

Parameters
item1The first item.
item2The second item.
item3The third item.
Returns
Murl.SharedArray.Float

Murl.SharedArray.Float.new(array)

Copy constructor taking an Array object.

Murl.SharedArray.Float new(Murl.Array.Float array)

Parameters
arrayThe array to copy.
Returns
Murl.SharedArray.Float

Murl.SharedArray.Float.new(array)

Copy constructor taking a shared array object.

Murl.SharedArray.Float new(Murl.SharedArray.Float array)

Parameters
arrayThe shared array to share.
Returns
Murl.SharedArray.Float


Methods


Clear()

Forward to Array::Clear() method.

Clear()


Empty()

Forward to Array::Empty() method.

Empty()


Shrink()

Forward to Array::Shrink() method.

Shrink()


Trim(n)

Forward to Array::Trim() method.

Boolean Trim(Integer n)

Parameters
nThe new number of items in the array.
Returns
Boolean true if successful.

Drop(n)

Forward to Array::Drop() method.

Boolean Drop(Integer n)

Parameters
nThe number of items to remove from the end.
Returns
Boolean true if successful.

Reserve(n)

Forward to Array::Reserve() method.

Reserve(Integer n)

Parameters
nThe number of items the underlying storage should hold.

SetCount(n)

Forward to Array::SetCount(SInt32 n) method.

Boolean SetCount(Integer n)

Parameters
nThe new number of items in the array.
Returns
Boolean true if successful.

SetCount(n, item)

Forward to Array::SetCount(SInt32 n, const DataType& item) method.

Boolean SetCount(Integer n, Number item)

Parameters
nThe new number of items in the array.
itemThe value to initialize any newly added items with.
Returns
Boolean true if successful.

SetCountAndReserve(n)

Forward to Array::SetCountAndReserve(SInt32 n) method.

Boolean SetCountAndReserve(Integer n)

Parameters
nThe new number of items in the array.
Returns
Boolean true if successful.

SetCountAndReserve(n, item)

Forward to Array::SetCountAndReserve(SInt32 n, const DataType& item) method.

Boolean SetCountAndReserve(Integer n, Number item)

Parameters
nThe new number of items in the array.
itemThe value to initialize any newly added items with.
Returns
Boolean true if successful.

Set(index, item)

Forward to Array::Set(SInt32 index, const DataType& item) method.

Number Set(Integer index, Number item)

Parameters
indexThe index of the item to set.
itemThe source item to copy.
Returns
Number A reference to the set item.

Set(index, item, count)

Forward to Array::Set(SInt32 index, const DataType& item, SInt32 count) method.

Boolean Set(Integer index, Number item, Integer count)

Parameters
indexThe index of the first item to set.
itemThe source item to copy.
countThe number of items to set.
Returns
Boolean true if successful.

Fill(item)

Forward to Array::Fill() method.

Fill(Number item)

Parameters
itemThe source item to copy.

Swap(index1, index2)

Forward to Array::Swap() method.

Swap(Integer index1, Integer index2)

Parameters
index1The index of the first item.
index2The index of the second item.

Add()

Forward to Array::Add() method.

Number Add()

Returns
Number A reference to the newly created item.

Add(item)

Forward to Array::Add(const DataType& item) method.

Number Add(Number item)

Parameters
itemThe given item to be inserted at the end of the array.
Returns
Number A reference to the newly created item.

Add(other)

Forward to Array::Add(const Array& other) method.

Boolean Add(Murl.SharedArray.Float other)

Parameters
otherThe given item array to be inserted.
Returns
Boolean true if successful.

Add(other, offset, count)

Forward to Array::Add(const Array& other, int offset, int count) method.

Boolean Add(Murl.SharedArray.Float other, Integer offset, Integer count)

Parameters
otherThe given source item array.
offsetThe index into the source array specifying the first item to copy.
countThe number of source array items to copy.
Returns
Boolean true if successful.

AddN(count)

Forward to Array::AddN() method.

AddN(Integer count)

Parameters
countThe number of new items to be inserted at the end of the array.

Insert(index)

Forward to Array::Insert(SInt32 index) method.

Number Insert(Integer index)

Parameters
indexthe zero-based index where the new item should be inserted.
Returns
Number A reference to the newly created item.

Insert(index, item)

Forward to Array::Insert(SInt32 index, const DataType& item) method.

Number Insert(Integer index, Number item)

Parameters
indexthe zero-based index where the new item should be inserted.
itemThe given item to be inserted.
Returns
Number A reference to the newly created item.

Insert(index, item, count)

Forward to Array::Insert(SInt32 index, const DataType& item, SInt32 count) method.

Boolean Insert(Integer index, Number item, Integer count)

Parameters
indexthe zero-based index where the new items should be inserted.
itemThe given item to be inserted.
countThe number of copies of the given item to insert.
Returns
Boolean true if successful.

Insert(index, other)

Forward to Array::Insert(SInt32 index, const Array& other) method.

Boolean Insert(Integer index, Murl.SharedArray.Float other)

Parameters
indexthe zero-based index where the new items should be inserted.
otherThe given item array to be inserted.
Returns
Boolean true if successful.

Insert(index, other, offset, count)

Forward to Array::Insert(SInt32 index, const Array& other, SInt32 offset, SInt32 count) method.

Boolean Insert(Integer index, Murl.SharedArray.Float other, Integer offset, Integer count)

Parameters
indexthe zero-based index where the new items should be inserted.
otherThe given source item array.
offsetThe index into the source array specifying the first item to copy.
countThe number of source array items to copy.
Returns
Boolean true if successful.

InsertN(index, count)

Forward to Array::InsertN(SInt32 index, SInt32 count = 1) method.

Boolean InsertN(Integer index, Integer count)

Parameters
indexthe zero-based index where the new items should be inserted.
countThe number of new items to be inserted.
Returns
Boolean true if successful.

Remove(index, count)

Forward to Array::Remove(SInt32 index, SInt32 count = 1) method.

Boolean Remove(Integer index, Integer count)

Parameters
indexThe zero-based index from where to remove the items.
countThe number of items to remove.
Returns
Boolean true if successful.

Remove(sortedIndices)

Forward to Array::Remove(const SInt32Array& sortedIndices) method.

Remove(Murl.Array.SInt32 sortedIndices)

Parameters
sortedIndicesA sorted array of indices where to remove the items.

Find(item)

Forward to Array::Find(const DataType& item) const method.

Integer Find(Number item)

Parameters
itemThe item to find.
Returns
Integer The index of the item, or -1 if the item was not found.

Find(item, firstIndex)

Forward to Array::Find(const DataType& item, SInt32 firstIndex) const method.

Integer Find(Number item, Integer firstIndex)

Parameters
itemThe item to find.
firstIndexThe index where to start searching.
Returns
Integer The index of the item, or -1 if the item was not found.

FindLast(item)

Forward to Array::FindLast(const DataType& item) const method.

Integer FindLast(Number item)

Parameters
itemThe item to find.
Returns
Integer The index of the item, or -1 if the item was not found.

FindLast(item, lastIndex)

Forward to Array::FindLast(const DataType& item, SInt32 lastIndex) const method.

Integer FindLast(Number item, Integer lastIndex)

Parameters
itemThe item to find.
lastIndexThe index where to start searching.
Returns
Integer The index of the item, or -1 if the item was not found.

Bottom()

Forward to Array::Bottom() const method.

Number Bottom()

Returns
Number A const reference to the first item.

Top()

Forward to Array::Top() const method.

Number Top()

Returns
Number A const reference to the last item.

Pop()

Forward to Array::Pop() method.

Number Pop()

Returns
Number A copy of the removed item.

At(index)

Forward to Array::At(SInt32 index) method.

Number At(Integer index)

Parameters
indexThe zero-based index of the item to retrieve.
Returns
Number A reference to the specified item.

At(index, item)

Forward to Array::At(SInt32 index, const DataType& item) method.

Number At(Integer index, Number item)

Parameters
indexThe zero-based index of the item to retrieve.
itemThe reference item used for initialization.
Returns
Number A reference to the specified item.

GetCount()

Forward to Array::GetCount() method.

Integer GetCount()

Returns
Integer The number of items.

IsEmpty()

Forward to Array::IsEmpty() method.

Boolean IsEmpty()

Returns
Boolean true if the array is empty, false otherwise.

GetAlloc()

Forward to Array::GetAlloc() method.

Integer GetAlloc()

Returns
Integer The number of allocated items.

IsEqual(other)

Forward to Array::IsEqual() method.

Boolean IsEqual(Murl.SharedArray.Float other)

Parameters
otherThe array to compare.
Returns
Boolean true if both arrays have identical contents.

Get(index)

Forward to Array::Get(SInt32 index) method.

Number Get(Integer index)

Parameters
indexThe zero-based index of the item to retrieve.
Returns
Number A reference to the specified item.

GetByteSize()

Forward to Array::GetByteSize() method.

Integer GetByteSize()

Returns
Integer The number of bytes of the underlying raw array.

GetArray()

Get a copy of the internal Array object.

Murl.Array.Float GetArray()

Returns
Murl.Array.Float A copy of the array object.


Metamethods


The length operator

The length operator is denoted by the unary prefix operator #.

Returns
GetCount()

The equal to operator.

Forward to Array::operator==() method.

Returns
Boolean = Murl.SharedArray.Float == Murl.SharedArray.Float

The array subscript operator.

Forward to Array::operator[](SInt32 index) method.

Parameters
indexThe zero-based index of the item to retrieve.
Returns
Number = Murl.SharedArray.Float [Integer index]
Assign
Murl.SharedArray.Float [Integer index] = Number