ext/ | |
License | Copyright © 2007-2011, FreeBASIC Extended Library Development Group |
fbext_Stack | Macro template that generates classes used to store element values of type T_ in a last-in first-out stack structure, using an object of type Container_(T_) to actually store the elements. |
Functions | |
constructor | Constructs an empty stack. |
constructor | Constructs a stack consisting of copies of the elements from the container object c. |
Size | Returns the size of the Stack. |
Empty | Returns ext.true if the stack contains zero elements, or ext.false otherwise. |
Top | Returns a pointer to the top-most element in the stack. |
cTop | Returns a pointer to the top-most element in the stack. |
Push | Adds an item onto the top of the stack. |
Pop | Removes the topmost item from the stack. |
Copyright © 2007-2011, 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
Macro template that generates classes used to store element values of type T_ in a last-in first-out stack structure, using an object of type Container_(T_) to actually store the elements.
T_ | the type of element value stored in the stack. |
Container_ | the name of the macro template used as the underlying container class. |
The macro template Container_ must accept T_ as its first argument. It also must support the following member procedures:
.Back( ) as T_ ptr .cBack( ) as const T_ ptr .PushBack( byref value as const T_ ) .PopBack( )
By default, Container_ is fbext Array, so the underlying container object is <fbext_Array(T_)>.
Functions | |
constructor | Constructs an empty stack. |
constructor | Constructs a stack consisting of copies of the elements from the container object c. |
Size | Returns the size of the Stack. |
Empty | Returns ext.true if the stack contains zero elements, or ext.false otherwise. |
Top | Returns a pointer to the top-most element in the stack. |
cTop | Returns a pointer to the top-most element in the stack. |
Push | Adds an item onto the top of the stack. |
Pop | Removes the topmost item from the stack. |
Constructs an empty stack.
declare constructor ( )
Returns the size of the Stack.
declare const function Size ( ) as ext.SizeType
Returns ext.true if the stack contains zero elements, or ext.false otherwise.
declare const function Empty ( ) as ext.bool
Returns a pointer to the top-most element in the stack.
declare function Top ( ) as fbext_TypeName(T_) ptr
Returns a pointer to the top-most element in the stack.
declare const function cTop ( ) as const fbext_TypeName(T_) ptr
Adds an item onto the top of the stack.
declare sub Push ( byref x as const fbext_TypeName(T_) )
Removes the topmost item from the stack.
declare sub Pop ( )