containers/ | |
License | Copyright © 2007-2011, FreeBASIC Extended Library Development Group |
ext | |
fbext_Queue((T_)(Container_)) | Macro template that generates classes used to store element values of type T_ in a first-in first-out queue structure, using an object of type fbext_TypeName(Container_)(T_) to actually store the elements. |
Functions | |
default constructor | Constructs an empty queue. |
constructor | Constructs a queue consisting of copies of the elements from the container object c. |
Size | Returns the size of the queue. |
Empty | Returns ext.true if the queue contains zero elements, or ext.false otherwise. |
Front | Returns a pointer to the first element in the queue. |
cFront | Returns a pointer to the first element in the queue. |
Back | Returns a pointer to the last element in the queue. |
cBack | Returns a pointer to the last element in the queue. |
Push | Adds an item onto the back of the queue. |
Pop | Removes the first element in the queue. |
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 first-in first-out queue structure, using an object of type fbext_TypeName(Container_)(T_) to actually store the elements.
T_ | the type of element value stored in the queue. |
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:
By default, Container_ is fbext_List.
Functions | |
default constructor | Constructs an empty queue. |
constructor | Constructs a queue consisting of copies of the elements from the container object c. |
Size | Returns the size of the queue. |
Empty | Returns ext.true if the queue contains zero elements, or ext.false otherwise. |
Front | Returns a pointer to the first element in the queue. |
cFront | Returns a pointer to the first element in the queue. |
Back | Returns a pointer to the last element in the queue. |
cBack | Returns a pointer to the last element in the queue. |
Push | Adds an item onto the back of the queue. |
Pop | Removes the first element in the queue. |
Constructs a queue consisting of copies of the elements from the container object c.
declare constructor ( byref c as const fbext_TypeName(Container_)((T_)) )
Returns the size of the queue.
declare const function Size ( ) as ext.SizeType
Returns ext.true if the queue contains zero elements, or ext.false otherwise.
declare const function Empty ( ) as ext.bool
Returns a pointer to the first element in the queue.
declare function Front ( ) as fbext_TypeName(T_) ptr
Returns a pointer to the first element in the queue.
declare const function cFront ( ) as const fbext_TypeName(T_) ptr
Returns a pointer to the last element in the queue.
declare function Back ( ) as fbext_TypeName(T_) ptr
Returns a pointer to the last element in the queue.
declare const function cBack ( ) as const fbext_TypeName(T_) ptr
Adds an item onto the back of the queue.
declare sub Push ( byref x as const fbext_TypeName(T_) )
Removes the first element in the queue.
declare sub Pop ( )