Home Page Toolkit Overview Using GML User Input Services Finger Tracker Calibrator Frame Grabber Service protocol Obtaining GML Installing GML Licence Developer Documentation Tcl/Tk API The GML Canvas Image processing Tcl Scripts Library List of Classes List of Files C/C++ API List of Classes List of Files |
gml_TArray Class Template Reference#include <gml_Array.h>
Inherited by gml_TStack. Collaboration diagram for gml_TArray: ![]() Detailed Descriptiontemplate<typename T>
Simple fixed-size typed arrays with transparent bounds checking.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| gml_TArray () | |
| Zero size and payload address. | |
| gml_TError | Init (unsigned size) |
| Allocate memory for the array. | |
| void | Dispose () |
| Release resources claimed by Init(). | |
| T & | operator[] (unsigned const index) |
| LValue indexing. | |
| T | operator[] (unsigned const index) const |
| RValue indexing. | |
| unsigned | Size () const |
| Return the number of elements in the array. | |
| gml_TError | Wrap (unsigned size, T const *const data) |
| Wrap an existing C array data of size items into a gml_TArray. A deep copy of the existing array is performed. | |
| void | Unwrap (unsigned size, T *const data) |
| Copy this gml_TArray into an existing C array of size size. The number of objects copied is the smaller of size and the size of this array. | |
| gml_TError | Clone (gml_TArray< T > const source) |
| Make this array a replicate of the argument array. Init () must have been called first. A deep copy of the existing array data is performed. | |
| void | Sort (int(*comparator)(T *, T *)) |
| Sort the underlying C array, using the argument comparison function. | |
Protected Attributes | |
| unsigned | fSize |
| number of elements in array | |
| T * | fData |
| array data | |
| gml_TError Wrap | ( | unsigned | size, | |
| T const *const | data | |||
| ) | [inline] |
Wrap an existing C array data of size items into a gml_TArray. A deep copy of the existing array is performed.
| void Unwrap | ( | unsigned | size, | |
| T *const | data | |||
| ) | [inline] |
Copy this gml_TArray into an existing C array of size size. The number of objects copied is the smaller of size and the size of this array.