Vuo  2.3.2
Classes | Macros | Functions

Description

Information structured in rows and columns.

Classes

struct  VuoTable
 Information structured in rows and columns. More...
 

Macros

#define VuoTable_REQUIRES_INTERPROCESS_JSON
 This type has a _getInterprocessJson() function. More...
 

Functions

VuoTable VuoTable_makeFromJson (struct json_object *js)
 Decodes the JSON object js to create a new value. More...
 
struct json_objectVuoTable_getJson (const VuoTable value)
 Encodes value as a JSON object that can only be decoded in the same process. More...
 
struct json_objectVuoTable_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...
 
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...
 
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 value)
 Replaces the auto-generated function in order to retain the items within vectors. More...
 
void VuoTable_release (VuoTable value)
 Replaces the auto-generated function in order to release the items within vectors. More...
 
VuoTable VuoTable_makeFromString (const char *str)
 Automatically generated function. More...
 
char * VuoTable_getString (const VuoTable value)
 Automatically generated function. More...
 
char * VuoTable_getInterprocessString (const VuoTable value)
 Automatically generated function. More...
 

Class Documentation

◆ VuoTable

struct VuoTable
Class Members
size_t columnCount The number of columns. The maximum of (*data)[i].size().
void * data The data items (a vector< vector<VuoText> > with outer vectors as rows and inner vectors as columns), including headers.
size_t rowCount The number of rows. Same as (*data).size().

Macro Definition Documentation

◆ VuoTable_REQUIRES_INTERPROCESS_JSON

#define VuoTable_REQUIRES_INTERPROCESS_JSON

This type has a _getInterprocessJson() function.

Definition at line 41 of file VuoTable.h.

Function Documentation

◆ VuoTable_addColumn()

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.

Definition at line 673 of file VuoTable.cc.

◆ VuoTable_addRow()

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.

Definition at line 640 of file VuoTable.cc.

◆ VuoTable_changeColumn_VuoInteger()

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.

Definition at line 744 of file VuoTable.cc.

◆ VuoTable_changeColumn_VuoText()

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.

Definition at line 780 of file VuoTable.cc.

◆ VuoTable_changeItem_VuoInteger_VuoInteger()

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.

Definition at line 792 of file VuoTable.cc.

◆ VuoTable_changeItem_VuoInteger_VuoText()

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.

Definition at line 813 of file VuoTable.cc.

◆ VuoTable_changeItem_VuoText_VuoInteger()

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.

Definition at line 825 of file VuoTable.cc.

◆ VuoTable_changeItem_VuoText_VuoText()

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.

Definition at line 837 of file VuoTable.cc.

◆ VuoTable_changeRow_VuoInteger()

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.

Definition at line 701 of file VuoTable.cc.

◆ VuoTable_changeRow_VuoText()

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.

Definition at line 732 of file VuoTable.cc.

◆ VuoTable_findFirstMatchingRow_VuoInteger()

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.

Changed in Vuo 2.0.0:
New.

Definition at line 896 of file VuoTable.cc.

◆ VuoTable_findFirstMatchingRow_VuoText()

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.

Changed in Vuo 2.0.0:
New.

Definition at line 927 of file VuoTable.cc.

◆ VuoTable_getColumn_VuoInteger()

VuoList_VuoText VuoTable_getColumn_VuoInteger ( VuoTable  table,
VuoInteger  columnIndex,
bool  includeHeader 
)

Returns the data values in the column at columnIndex (indexed from 1).

Empty cells are returned as NULL.

Definition at line 552 of file VuoTable.cc.

◆ VuoTable_getColumn_VuoText()

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.

Empty cells are returned as NULL.

Definition at line 576 of file VuoTable.cc.

◆ VuoTable_getInterprocessJson()

struct json_object* VuoTable_getInterprocessJson ( const VuoTable  value)

Encodes value as a JSON object that can be decoded in a separate process.

Definition at line 106 of file VuoTable.cc.

◆ VuoTable_getInterprocessString()

char* VuoTable_getInterprocessString ( const VuoTable  value)

Automatically generated function.

◆ VuoTable_getItem_VuoInteger_VuoInteger()

VuoText VuoTable_getItem_VuoInteger_VuoInteger ( VuoTable  table,
VuoInteger  rowIndex,
VuoInteger  columnIndex 
)

Returns the data value at row rowIndex and column columnIndex.

Definition at line 588 of file VuoTable.cc.

◆ VuoTable_getItem_VuoInteger_VuoText()

VuoText VuoTable_getItem_VuoInteger_VuoText ( VuoTable  table,
VuoInteger  rowIndex,
VuoText  columnHeader 
)

Returns the data value at row rowIndex and column with header columnHeader.

Definition at line 603 of file VuoTable.cc.

◆ VuoTable_getItem_VuoText_VuoInteger()

VuoText VuoTable_getItem_VuoText_VuoInteger ( VuoTable  table,
VuoText  rowHeader,
VuoInteger  columnIndex 
)

Returns the data value at row with header rowHeader and column columnIndex.

Definition at line 615 of file VuoTable.cc.

◆ VuoTable_getItem_VuoText_VuoText()

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.

Definition at line 627 of file VuoTable.cc.

◆ VuoTable_getJson()

struct json_object* VuoTable_getJson ( const VuoTable  value)

Encodes value as a JSON object that can only be decoded in the same process.

Definition at line 92 of file VuoTable.cc.

◆ VuoTable_getRow_VuoInteger()

VuoList_VuoText VuoTable_getRow_VuoInteger ( VuoTable  table,
VuoInteger  rowIndex,
bool  includeHeader 
)

Returns the data values in the row at rowIndex (indexed from 1).

Empty cells are returned as NULL.

Definition at line 515 of file VuoTable.cc.

◆ VuoTable_getRow_VuoText()

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.

Empty cells are returned as NULL.

Definition at line 539 of file VuoTable.cc.

◆ VuoTable_getString()

char* VuoTable_getString ( const VuoTable  value)

Automatically generated function.

◆ VuoTable_getSummary()

char* VuoTable_getSummary ( const VuoTable  value)

Returns a human-readable description of value.

Definition at line 121 of file VuoTable.cc.

◆ VuoTable_makeEmpty()

VuoTable VuoTable_makeEmpty ( void  )

Returns a table with nothing in it.

Definition at line 167 of file VuoTable.cc.

◆ VuoTable_makeFromJson()

VuoTable VuoTable_makeFromJson ( struct json_object js)

Decodes the JSON object js to create a new value.

Definition at line 57 of file VuoTable.cc.

◆ VuoTable_makeFromString()

VuoTable VuoTable_makeFromString ( const char *  str)

Automatically generated function.

◆ VuoTable_makeFromText()

VuoTable VuoTable_makeFromText ( VuoText  text,
VuoTableFormat  format 
)

Returns a table parsed from text, a CSV- or TSV-formatted string.

Definition at line 235 of file VuoTable.cc.

◆ VuoTable_release()

void VuoTable_release ( VuoTable  value)

Replaces the auto-generated function in order to release the items within vectors.

Definition at line 952 of file VuoTable.cc.

◆ VuoTable_removeColumn()

VuoTable VuoTable_removeColumn ( VuoTable  table,
VuoListPosition  position 
)

Returns a table in which the first or last column has been removed.

Definition at line 869 of file VuoTable.cc.

◆ VuoTable_removeRow()

VuoTable VuoTable_removeRow ( VuoTable  table,
VuoListPosition  position 
)

Returns a table in which the first or last row has been removed.

Definition at line 850 of file VuoTable.cc.

◆ VuoTable_retain()

void VuoTable_retain ( VuoTable  value)

Replaces the auto-generated function in order to retain the items within vectors.

Definition at line 939 of file VuoTable.cc.

◆ VuoTable_serialize()

VuoText VuoTable_serialize ( VuoTable  table,
VuoTableFormat  format 
)

Returns a CSV- or TSV-formatted string representation of a table.

Definition at line 286 of file VuoTable.cc.

◆ VuoTable_sort_VuoInteger()

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.

columnIndex is clamped to a valid index (between 1 and columnCount).

If firstRowIsHeader is true, the first row is left in place and the remaining rows are sorted.

If multiple items in the selected column have the same value, this function preserves their ordering (stable sort).

Definition at line 435 of file VuoTable.cc.

◆ VuoTable_sort_VuoText()

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.

The first column whose header (value in first row) contains columnHeader (case-insensitive comparison) is selected. If no such column exists, the original (unsorted) table is returned.

Definition at line 479 of file VuoTable.cc.

◆ VuoTable_transpose()

VuoTable VuoTable_transpose ( VuoTable  table)

Diagonally flips the table.

Definition at line 492 of file VuoTable.cc.