Commit c26b8d5a authored by Philippe Pebay's avatar Philippe Pebay
Browse files

ENH: added a SetNumberOfRows() method.

parent f9e971ff
......@@ -35,7 +35,7 @@
// Standard functions
//
vtkCxxRevisionMacro(vtkTable, "1.29");
vtkCxxRevisionMacro(vtkTable, "1.30");
vtkStandardNewMacro(vtkTable);
vtkCxxSetObjectMacro(vtkTable, RowData, vtkDataSetAttributes);
......@@ -179,6 +179,15 @@ vtkIdType vtkTable::GetNumberOfRows()
return 0;
}
//----------------------------------------------------------------------------
void vtkTable::SetNumberOfRows( vtkIdType n )
{
if( this->RowData )
{
this->RowData->SetNumberOfTuples( n );
}
}
//----------------------------------------------------------------------------
vtkVariantArray* vtkTable::GetRow(vtkIdType row)
{
......
......@@ -90,6 +90,11 @@ public:
// Get the number of rows in the table.
vtkIdType GetNumberOfRows();
// Description:
// Set the number of rows in the table. Note that memory allocation might be performed
// as a result of this, but no memory will be released.
void SetNumberOfRows(const vtkIdType );
// Description:
// Get a row of the table as a vtkVariantArray which has one entry for each column.
// NOTE: This version of the method is NOT thread safe.
......@@ -124,7 +129,6 @@ public:
// Get the number of columns in the table.
vtkIdType GetNumberOfColumns();
// Description:
// Get the name of a column of the table.
const char* GetColumnName(vtkIdType col);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment