|
Yate
|
#include <yateclass.h>
Public Member Functions | |
| Array (int columns=0, int rows=0) | |
| virtual | ~Array () |
| virtual void * | getObject (const String &name) const |
| bool | addRow (ObjList *row=0, int index=-1) |
| bool | addColumn (ObjList *column=0, int index=-1) |
| bool | delRow (int index) |
| bool | delColumn (int index) |
| GenObject * | get (int column, int row) const |
| GenObject * | take (int column, int row) |
| bool | set (GenObject *obj, int column, int row) |
| int | getRows () const |
| int | getColumns () const |
| ObjList * | getColumn (int column) const |
A list based Array.
A simple Array class derivated from RefObject It uses one ObjList to keep the pointers to other ObjList's. Data is organized in columns - the main ObjList holds pointers to one ObjList for each column. This class has been written by Diana
| Array | ( | int | columns = 0, |
| int | rows = 0 |
||
| ) | [explicit] |
Creates a new empty array.
| columns | Initial number of columns |
| rows | Initial number of rows |
| virtual ~Array | ( | ) | [virtual] |
Destructor. Destructs all objects in the array
Insert a column of objects
| column | List of objects to insert or NULL |
| index | Number of the column to insert before, negative to append |
Insert a row of objects
| row | List of objects to insert or NULL |
| index | Number of the row to insert before, negative to append |
| bool delColumn | ( | int | index | ) |
Delete an entire column of objects
| index | Number of the column to delete |
| bool delRow | ( | int | index | ) |
Delete an entire row of objects
| index | Number of the row to delete |
Retrieve an object from the array
| column | Number of the column in the array |
| row | Number of the row in the array |
Retrieve a column. Note: Use the returned list only to get or set data. List items must not be removed or appended
| column | Column to retrieve |
| int getColumns | ( | ) | const [inline] |
Get the number of columns in the array
Get a pointer to a derived class given that class name
| name | Name of the class we are asking for |
Reimplemented from RefObject.
| int getRows | ( | ) | const [inline] |
Get the number of rows in the array
Store an object in the array
| obj | Object to store in the array |
| column | Number of the column in the array |
| row | Number of the row in the array |
Retrieve and remove an object from the array
| column | Number of the column in the array |
| row | Number of the row in the array |
1.7.6.1