CWB
|
The table object. More...
#include <table.h>
The table object.
Tables are used to store query results, i.e. subcorpora with optional target fields.
All fields (Match, MatchEnd, and the various Target fields) are treated uniformly as the columns of a table: {table.field[MatchField]}, {table.field[MatchEndField]}, ... {table.size} is the number of rows (i.e. the number of cells in each column). Each column may be undefined, i.e. NULL. Rows where the MatchField column equals -1 are understood as 'deleted' rows. To allow tables to grow automatically, the number of allocated rows {table.allocated} may be greater than {table.size}. All columns must be allocated to the same size.
unsigned allocated |
number of cells allocated for all non-NULL fields
unsigned size |
all fields have the same size (or are NULL)
int* sortidx |
optional sort index (honoured by all access functions)