VuoTable implementation.
Definition in file VuoTable.cc.
Go to the source code of this file.
Classes | |
class | ParserContext |
Helper for VuoTable_makeFromText(). More... | |
struct | ColumnSort |
Helper for VuoTable_sort_VuoInteger() . More... | |
Functions | |
static void | deleteData (void *data) |
Deallocates a vector< vector<VuoText> > * . More... | |
VuoTable | VuoTable_makeFromJson (struct json_object *js) |
Decodes the JSON object js to create a new value. More... | |
struct json_object * | VuoTable_getJson (const VuoTable value) |
Encodes value as a JSON object that can only be decoded in the same process. More... | |
struct json_object * | VuoTable_getInterprocessJson (const VuoTable value) |
Encodes value as a JSON object that can be decoded in a separate process. More... | |
char * | VuoTable_getSummary (const VuoTable value) |
Returns a human-readable description of value. More... | |
VuoTable | VuoTable_makeEmpty (void) |
Returns a table with nothing in it. More... | |
static void | parserGotItem (void *item, size_t numBytes, void *userData) |
Helper for VuoTable_makeFromText(). More... | |
static void | parserGotLine (int lineEnd, void *userData) |
Helper for VuoTable_makeFromText(). More... | |
VuoTable | VuoTable_makeFromText (VuoText text, VuoTableFormat format) |
Returns a table parsed from text, a CSV- or TSV-formatted string. More... | |
VuoText | VuoTable_serialize (VuoTable table, VuoTableFormat format) |
Returns a CSV- or TSV-formatted string representation of a table. More... | |
static VuoInteger | getIndexForHeader (VuoTable table, VuoText header, bool isColumnHeader) |
Returns the index (indexed from 1) of the first column/row whose header (value in first row/column) contains header (case-insensitive comparison). More... | |
static VuoInteger | getClampedIndex (VuoTable table, VuoInteger index, bool isColumnIndex) |
Returns index if it's in bounds, or the closest in-bounds index if not (indexed from 1). More... | |
VuoTable | VuoTable_sort_VuoInteger (VuoTable table, VuoInteger columnIndex, VuoTextSort sortType, VuoSortOrder sortOrder, bool firstRowIsHeader) |
Sorts the table's rows based on the values in the given column. More... | |
VuoTable | VuoTable_sort_VuoText (VuoTable table, VuoText columnHeader, VuoTextSort sortType, VuoSortOrder sortOrder, bool firstRowIsHeader) |
Sorts the table's rows based on the values in the given column. More... | |
VuoTable | VuoTable_transpose (VuoTable table) |
Diagonally flips the table. More... | |
VuoList_VuoText | VuoTable_getRow_VuoInteger (VuoTable table, VuoInteger rowIndex, bool includeHeader) |
Returns the data values in the row at rowIndex (indexed from 1). More... | |
VuoList_VuoText | VuoTable_getRow_VuoText (VuoTable table, VuoText rowHeader, bool includeHeader) |
Returns the data values in the row whose header (value in first column) matches rowHeader. More... | |
VuoList_VuoText | VuoTable_getColumn_VuoInteger (VuoTable table, VuoInteger columnIndex, bool includeHeader) |
Returns the data values in the column at columnIndex (indexed from 1). More... | |
VuoList_VuoText | VuoTable_getColumn_VuoText (VuoTable table, VuoText columnHeader, bool includeHeader) |
Returns the data values in the column whose header (value in first row) matches columnHeader. More... | |
VuoText | VuoTable_getItem_VuoInteger_VuoInteger (VuoTable table, VuoInteger rowIndex, VuoInteger columnIndex) |
Returns the data value at row rowIndex and column columnIndex. More... | |
VuoText | VuoTable_getItem_VuoInteger_VuoText (VuoTable table, VuoInteger rowIndex, VuoText columnHeader) |
Returns the data value at row rowIndex and column with header columnHeader. More... | |
VuoText | VuoTable_getItem_VuoText_VuoInteger (VuoTable table, VuoText rowHeader, VuoInteger columnIndex) |
Returns the data value at row with header rowHeader and column columnIndex. More... | |
VuoText | VuoTable_getItem_VuoText_VuoText (VuoTable table, VuoText rowHeader, VuoText columnHeader) |
Returns the data value at row with header rowHeader and column with header columnHeader. More... | |
VuoTable | VuoTable_addRow (VuoTable table, VuoListPosition position, VuoList_VuoText values) |
Returns a table in which values has been added as a new row, either before the first or after the last row. More... | |
VuoTable | VuoTable_addColumn (VuoTable table, VuoListPosition position, VuoList_VuoText values) |
Returns a table in which values has been added as a new column, either before the first or after the last column. More... | |
VuoTable | VuoTable_changeRow_VuoInteger (VuoTable table, VuoInteger rowIndex, VuoList_VuoText newValues, bool preserveHeader) |
Returns a table in which newValues has replaced the row at rowIndex. More... | |
VuoTable | VuoTable_changeRow_VuoText (VuoTable table, VuoText rowHeader, VuoList_VuoText newValues, bool preserveHeader) |
Returns a table in which newValues has replaced the row with header rowHeader. More... | |
VuoTable | VuoTable_changeColumn_VuoInteger (VuoTable table, VuoInteger columnIndex, VuoList_VuoText newValues, bool preserveHeader) |
Returns a table in which newValues has replaced the column at columnIndex. More... | |
VuoTable | VuoTable_changeColumn_VuoText (VuoTable table, VuoText columnHeader, VuoList_VuoText newValues, bool preserveHeader) |
Returns a table in which newValues has replaced the column with header columnHeader. More... | |
VuoTable | VuoTable_changeItem_VuoInteger_VuoInteger (VuoTable table, VuoInteger rowIndex, VuoInteger columnIndex, VuoText newValue) |
Returns a table in which newValue has replaced the value at row rowIndex and column columnIndex. More... | |
VuoTable | VuoTable_changeItem_VuoInteger_VuoText (VuoTable table, VuoInteger rowIndex, VuoText columnHeader, VuoText newValue) |
Returns a table in which newValue has replaced the value at row rowIndex and column with header columnHeader. More... | |
VuoTable | VuoTable_changeItem_VuoText_VuoInteger (VuoTable table, VuoText rowHeader, VuoInteger columnIndex, VuoText newValue) |
Returns a table in which newValue has replaced the value at row with header rowHeader and column columnIndex. More... | |
VuoTable | VuoTable_changeItem_VuoText_VuoText (VuoTable table, VuoText rowHeader, VuoText columnHeader, VuoText newValue) |
Returns a table in which newValue has replaced the value at row with header rowHeader and column with header columnHeader. More... | |
VuoTable | VuoTable_removeRow (VuoTable table, VuoListPosition position) |
Returns a table in which the first or last row has been removed. More... | |
VuoTable | VuoTable_removeColumn (VuoTable table, VuoListPosition position) |
Returns a table in which the first or last column has been removed. More... | |
VuoList_VuoText | VuoTable_findFirstMatchingRow_VuoInteger (VuoTable table, VuoInteger columnIndex, VuoText valueToFind, VuoTextComparison valueComparison, bool includeHeader) |
Returns the first row whose cell at column columnIndex matches valueToFind . More... | |
VuoList_VuoText | VuoTable_findFirstMatchingRow_VuoText (VuoTable table, VuoText columnHeader, VuoText valueToFind, VuoTextComparison valueComparison, bool includeHeader) |
Returns the first row whose cell at column columnHeader matches valueToFind . More... | |
void | VuoTable_retain (VuoTable table) |
Replaces the auto-generated function in order to retain the items within vectors. More... | |
void | VuoTable_release (VuoTable table) |
Replaces the auto-generated function in order to release the items within vectors. More... | |
|
static |
Deallocates a vector< vector<VuoText> > *
.
Definition at line 48 of file VuoTable.cc.
|
static |
Returns index if it's in bounds, or the closest in-bounds index if not (indexed from 1).
Definition at line 382 of file VuoTable.cc.
|
static |
Returns the index (indexed from 1) of the first column/row whose header (value in first row/column) contains header (case-insensitive comparison).
Definition at line 354 of file VuoTable.cc.
|
static |
Helper for VuoTable_makeFromText().
Callback for when the parser has gotten a single item of table data.
Definition at line 208 of file VuoTable.cc.
|
static |
Helper for VuoTable_makeFromText().
Callback for when the parser has reached the end of a line.
Definition at line 225 of file VuoTable.cc.