memory/ sharedarray.bi | |
License | Copyright © 2009, FreeBASIC Extended Library Development Group |
Macros | |
FBEXT_SHAREDARRAY | |
Functions | |
default constructor | Constructs a fbext_SharedPtrArray(T_) with the address of an array of objects. |
constructor | Constructs a fbext_SharedPtrArray(T_) with the address of an array of objects. |
copy constructor | Constructs a fbext_SharedPtrArray(T_) by sharing the resource of another. |
destructor | Destroys a fbext_SharedPtrArray(T_). |
Index | Returns the address of an element in the referenced array. |
Reset | Forces the fbext_SharedPtrArray(T_) to reference another resource. |
Reset | Forces the fbext_SharedPtrArray(T_) to reference another resource. |
Get | Retrieves the wrapped pointer. |
Swap_ | Swaps the value of this fbext_SharedPtrArray(T_) with another. |
Swap_ | Global ext.Swap_ overload. |
Copyright © 2009, FreeBASIC Extended Library Development Group
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License
Constructs a fbext_SharedPtrArray(T_) with the address of an array of objects.
p | The address of the array to reference. |
p defaults to //null// if not specified, meaning the fbext_SharedPtrArray(T_) references no resource. When the last fbext_SharedPtrArray(T_) referencing the resource is destroyed, ..DELETE[] will be called to free the resource.
declare constructor ( byval p as fbext_TypeName(T_) ptr, byval d as fbext_DestroyProc(T_) )
Constructs a fbext_SharedPtrArray(T_) with the address of an array of objects.
p | The address of the array to reference. |
destroy | The address of a procedure that will be passed the wrapped pointer when no more fbext_SharedPtrArray(T_) objects reference it. |
p defaults to //null// if not specified, meaning the fbext_SharedPtrArray(T_) references no resource. When the last fbext_SharedPtrArray(T_) referencing the resource is destroyed, d will be called to handle freeing the resource. If d is //null//, ..DELETE[] will be called instead.
Constructs a fbext_SharedPtrArray(T_) by sharing the resource of another.
x | The other fbext_SharedPtrArray(T_). |
The newly constructed fbext_SharedPtrArray(T_) will share the resource, if any, referenced by x. Any destruction procedure bound to the resource is also copied.
declare sub Reset ( byval p as fbext_TypeName(T_) ptr = null )
Forces the fbext_SharedPtrArray(T_) to reference another resource.
p | The address of the new resource. |
If no other fbext_SharedPtrArray(T_) references this resource, it is destroyed using ..DELETE[], or the user-supplied destruction procedure. The fbext_SharedPtrArray(T_) will then reference the resource pointed to by p, or no resource if p is //null//.
Behaves like this.Swap_(fbext_SharedPtrArray(T_)(p)).
declare sub Reset ( byval p as fbext_TypeName(T_) ptr, byval d as fbext_DestroyProc(T_) )
Forces the fbext_SharedPtrArray(T_) to reference another resource.
p | The address of the new resource. |
destroy | The address of a procedure that will be passed the wrapped pointer when no more fbext_SharedPtrArray(T_) objects reference it. |
If no other fbext_SharedPtrArray(T_) references this resource, it is destroyed using ..DELETE[], or the user-supplied destruction procedure. The fbext_SharedPtrArray(T_) will then reference the resource pointed to by p, or no resource if p is //null//.
Behaves like this.Swap_(fbext_SharedPtrArray(T_)(p, d)).
Constructs a fbext_SharedPtrArray(T_) with the address of an array of objects.
declare constructor ( byval p as fbext_TypeName(T_) ptr, byval d as fbext_DestroyProc(T_) )
Destroys a fbext_SharedPtrArray(T_).
declare destructor ( )
Returns the address of an element in the referenced array.
declare function Index ( byval i as ext.SizeType ) as fbext_TypeName(T_) ptr
Forces the fbext_SharedPtrArray(T_) to reference another resource.
declare sub Reset ( byval p as fbext_TypeName(T_) ptr = null )
Retrieves the wrapped pointer.
declare function Get ( ) as fbext_TypeName(T_) ptr
Swaps the value of this fbext_SharedPtrArray(T_) with another.
declare sub Swap_ ( byref x as fbext_SharedPtrArray(T_) )