Commit 54531ae7 authored by Jeff Baumes's avatar Jeff Baumes
Browse files

ENH: Added SetRow() to vtkTable.

parent ab3ca337
......@@ -28,7 +28,7 @@
// Standard functions
//
vtkCxxRevisionMacro(vtkTable, "1.6");
vtkCxxRevisionMacro(vtkTable, "1.7");
vtkStandardNewMacro(vtkTable);
//----------------------------------------------------------------------------
......@@ -100,6 +100,16 @@ vtkVariantArray* vtkTable::GetRow(vtkIdType row)
//----------------------------------------------------------------------------
void vtkTable::SetRow(vtkIdType row, vtkVariantArray* values)
{
for (int i = 0; i < this->GetNumberOfColumns(); i++)
{
this->SetValue(row, i, values->GetValue(i));
}
}
//----------------------------------------------------------------------------
vtkIdType vtkTable::InsertNextBlankRow()
{
int n = this->FieldData->GetNumberOfArrays();
......
......@@ -69,6 +69,10 @@ public:
// Get a row of the table as a vtkVariantArray which has one entry for each column.
vtkVariantArray* GetRow(vtkIdType row);
// Description:
// Set a row of the table with a vtkVariantArray which has one entry for each column.
void SetRow(vtkIdType row, vtkVariantArray* values);
// Description:
// Insert a blank row at the end of the table.
vtkIdType InsertNextBlankRow();
......
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