Murl Engine Lua Addon API  Version 1.0 beta
Murl.SharedPointer.LogicINodeObserver

The SharedPointer class.

The SharedPointer holds a reference counted memory pointer, which is deleted when the last reference is removed. To avoid cross-references a WeakPointer can be used.


Table members

Inherited


Murl.Logic.INodeObserver

Functions


Murl.SharedPointer.LogicINodeObserver.new()

The default constructor creating a null pointer.

Murl.SharedPointer.LogicINodeObserver new()

Returns
Murl.SharedPointer.LogicINodeObserver


Methods


_IsNull()

Check if the memory pointer is null.

Boolean _IsNull()

Returns
Boolean true if the memory pointer is null.

_GetCount()

Get the SharedPointer's usage counter.

Integer _GetCount()

Returns
Integer The number of SharePointer instances referencing to the same memory pointer.

_IsUnique()

Check if the SharedPointer is the only one instance which is referencing the memory pointer.

Boolean _IsUnique()

Returns
Boolean true if the SharedPointer's usage counter is 1.

_Reset()

Release the reference from the SharedPointer and set the memory pointer to null.

_Reset()


_Swap(sharedPointer)

Swap with another SharedPointer.

Murl.SharedPointer.LogicINodeObserver _Swap(Murl.SharedPointer.LogicINodeObserver sharedPointer)

Parameters
sharedPointerThe SharedPointer to swap with.
Returns
Murl.SharedPointer.LogicINodeObserver sharedPointer The SharedPointer to swap with.

_Get()

Get the pointer to the memory. The memory pointer should be used within local scope only! If the SharedPointer object goes out-of-scope, the validity of the memory location it is no longer guaranteed.

Murl.Logic.INodeObserver _Get()

Returns
Murl.Logic.INodeObserver The pointer to the memory.