Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
c26b8d5a
Commit
c26b8d5a
authored
Aug 20, 2009
by
Philippe Pebay
Browse files
ENH: added a SetNumberOfRows() method.
parent
f9e971ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Filtering/vtkTable.cxx
View file @
c26b8d5a
...
...
@@ -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
)
{
...
...
Filtering/vtkTable.h
View file @
c26b8d5a
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment