template<typename T, typename Comp>
class GClasses::GRelationalTable< T, Comp >
See GTree.cpp for an example of how to use this class.
|
| GRelationalTable (const Comp &c) |
|
| ~GRelationalTable () |
|
void | clear () |
| Drops all content from this table. More...
|
|
GRelationalRow< T > * | find (const T &row, size_t col, size_t *outIndex=NULL) |
| Returns a row where the element in column col matches the one in the provided row. Returns NULL if no matches exist. If outIndex is non-NULL, it will be made to point to the index of the returned row when sorted in column col. More...
|
|
GRelationalRow< T > * | firstEqualOrGreater (const T &row, size_t col, size_t *outIndex=NULL) |
| Returns the first occurrence of a row where the element in column col is equal or greater than the one in the provided row. Returns NULL if no rows contain an element in column col greater than the one in row. If outIndex is non-NULL, it will be made to point to the index of the returned row when sorted in column col. More...
|
|
GRelationalRow< T > * | get (size_t n, size_t col) |
| Returns the nth row when the rows are sorted by column col. More...
|
|
void | insert (const T &row) |
| Inserts a row into this relational table. More...
|
|
void | print (std::ostream &stream, size_t col) |
| Prints a simple representation of the tree in the specified column. This method assumes that the Comp object has a method with the signature "void print(std::ostream& stream, T) const". More...
|
|
void | remove (GRelationalRow< T > *row) |
| Removes the specified row from this relational table. (Behavior is undefined if the specified row is not actually in the table.) More...
|
|
size_t | size () |
| Returns the number of rows in this relational table. More...
|
|