memory/ scopedptrarray.bi | |
License | Copyright © 2009, FreeBASIC Extended Library Development Group |
ext | |
ScopedArray | This class implements a pointer array container similiar to boost::scoped_array. |
Functions | |
constuctor | This constructor takes another ScopedArray as its argument and transfers ownership to the newly created ScopedArray. |
constructor | This constructor takes a pointer array of (type) and becomes responsible for its deletion. |
constructor | This constructor takes a pointer of (type) and will call a user passed subroutine to free the memory. |
Operator Let | Transfers ownership of a pointer to the lhs ScopedArray. |
Operator Cast | Provided to allow passing a ScopedArray(type) to a procedure requiring a (type) ptr |
Get | Provided to allow passing a ScopedArray(type) to a procedure requiring a (type) ptr |
index | Provided to allow accessing values in the pointer array. |
* (dereference) | Dereferences the (type) pointer owned by a ScopedArray returning the value pointed to by the pointer. |
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
This class implements a pointer array container similiar to boost::scoped_array.
A ScopedArray is guaranteed to be deleted when it goes out of scope.
A ScopedArray has sole ownership of a pointer array, if assigned to another ScopedArray the new ScopedArray will gain ownership of the pointer array and the original ScopedArray is now invalid.
Functions | |
constuctor | This constructor takes another ScopedArray as its argument and transfers ownership to the newly created ScopedArray. |
constructor | This constructor takes a pointer array of (type) and becomes responsible for its deletion. |
constructor | This constructor takes a pointer of (type) and will call a user passed subroutine to free the memory. |
Operator Let | Transfers ownership of a pointer to the lhs ScopedArray. |
Operator Cast | Provided to allow passing a ScopedArray(type) to a procedure requiring a (type) ptr |
Get | Provided to allow passing a ScopedArray(type) to a procedure requiring a (type) ptr |
index | Provided to allow accessing values in the pointer array. |
* (dereference) | Dereferences the (type) pointer owned by a ScopedArray returning the value pointed to by the pointer. |
This constructor takes a pointer array of (type) and becomes responsible for its deletion.
declare constructor ( byval p as fbext_TypeName(T_) ptr = null )
Provided to allow passing a ScopedArray(type) to a procedure requiring a (type) ptr
declare function Get ( ) as fbext_TypeName(T_) ptr
Provided to allow accessing values in the pointer array.
declare function index ( byval rhs as integer ) as fbext_TypeName(T_)
Dereferences the (type) pointer owned by a ScopedArray returning the value pointed to by the pointer.
declare operator * ( byref rhs as fbext_ScopedPtrArray(T_) ) as fbext_TypeName(T_)