VTK
vtkTable.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTable.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
56 #ifndef vtkTable_h
57 #define vtkTable_h
58 
59 #include "vtkCommonDataModelModule.h" // For export macro
60 #include "vtkDataObject.h"
61 
62 class vtkAbstractArray;
64 class vtkVariant;
65 class vtkVariantArray;
66 
68 {
69 public:
70  static vtkTable* New();
72  void PrintSelf(ostream &os, vtkIndent indent);
73 
78  void Dump( unsigned int colWidth = 16, int rowLimit = -1 );
79 
81  int GetDataObjectType() {return VTK_TABLE;}
82 
88  virtual unsigned long GetActualMemorySize();
89 
91 
95 
96  //
97  // Row functions
98  //
99 
102 
107 
111 
115 
119 
121  vtkIdType InsertNextBlankRow(double default_num_val=0.0);
122 
126 
130 
131  //
132  // Column functions
133  //
134 
137 
138  // Get the name of a column of the table.
139  const char* GetColumnName(vtkIdType col);
140 
143 
146 
149 
151  void RemoveColumnByName(const char* name);
152 
155 
156  //
157  // Table single entry functions
158  //
159 
165 
169 
172 
174  void SetValueByName(vtkIdType row, const char* col, vtkVariant value);
175 
177  virtual void Initialize();
178 
180 
184 
186 
187  virtual void ShallowCopy(vtkDataObject* src);
188  virtual void DeepCopy(vtkDataObject* src);
190 
196 
199 
200 protected:
203 
206 
209 
210 private:
211  vtkTable(const vtkTable&); // Not implemented
212  void operator=(const vtkTable&); // Not implemented
213 };
214 
215 #endif
216 
vtkgl::data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkTable::GetActualMemorySize
virtual unsigned long GetActualMemorySize()
vtkTable::vtkTable
vtkTable()
vtkTable::SetRowData
virtual void SetRowData(vtkDataSetAttributes *data)
vtkTable::SetNumberOfRows
void SetNumberOfRows(const vtkIdType)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkCommonDataModelModule.h
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:58
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkTable::GetAttributesAsFieldData
virtual vtkFieldData * GetAttributesAsFieldData(int type)
vtkTable::Dump
void Dump(unsigned int colWidth=16, int rowLimit=-1)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkgl::v
const GLdouble * v
Definition: vtkgl.h:11595
vtkTable::GetColumnName
const char * GetColumnName(vtkIdType col)
VTK_TABLE
#define VTK_TABLE
Definition: vtkType.h:85
vtkVariantArray
An array holding vtkVariants.
Definition: vtkVariantArray.h:48
vtkTable::New
static vtkTable * New()
vtkTable::GetRow
vtkVariantArray * GetRow(vtkIdType row)
vtkTable::RowArray
vtkVariantArray * RowArray
Definition: vtkTable.h:208
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:56
vtkTable::GetColumn
vtkAbstractArray * GetColumn(vtkIdType col)
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkTable::GetColumnByName
vtkAbstractArray * GetColumnByName(const char *name)
vtkTable::~vtkTable
~vtkTable()
vtkgl::value
GLsizei const GLfloat * value
Definition: vtkgl.h:12021
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkTable::DeepCopy
virtual void DeepCopy(vtkDataObject *src)
vtkgl::src
GLenum src
Definition: vtkgl.h:12525
vtkTable::GetValueByName
vtkVariant GetValueByName(vtkIdType row, const char *col)
vtkTable::RemoveColumnByName
void RemoveColumnByName(const char *name)
vtkTable::ShallowCopy
virtual void ShallowCopy(vtkDataObject *src)
vtkTable::SetValue
void SetValue(vtkIdType row, vtkIdType col, vtkVariant value)
vtkgl::row
GLenum GLenum GLvoid * row
Definition: vtkgl.h:11352
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:79
vtkTable::GetData
static vtkTable * GetData(vtkInformation *info)
vtkTable::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkTable::SetValueByName
void SetValueByName(vtkIdType row, const char *col, vtkVariant value)
vtkTable::SetRow
void SetRow(vtkIdType row, vtkVariantArray *values)
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:65
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkTable::RemoveColumn
void RemoveColumn(vtkIdType col)
vtkTable::RowData
vtkDataSetAttributes * RowData
Definition: vtkTable.h:205
vtkTable::InsertNextRow
vtkIdType InsertNextRow(vtkVariantArray *arr)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkTable::GetValue
vtkVariant GetValue(vtkIdType row, vtkIdType col)
vtkTable::GetNumberOfColumns
vtkIdType GetNumberOfColumns()
vtkDataObject.h
vtkTable::Initialize
virtual void Initialize()
vtkTable::GetNumberOfRows
vtkIdType GetNumberOfRows()
VTKCOMMONDATAMODEL_EXPORT
#define VTKCOMMONDATAMODEL_EXPORT
Definition: vtkCommonDataModelModule.h:15
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkTable::RemoveRow
void RemoveRow(vtkIdType row)
vtkTable::GetRow
void GetRow(vtkIdType row, vtkVariantArray *values)
vtkTable::GetData
static vtkTable * GetData(vtkInformationVector *v, int i=0)
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkTable::AddColumn
void AddColumn(vtkAbstractArray *arr)
vtkTable::InsertNextBlankRow
vtkIdType InsertNextBlankRow(double default_num_val=0.0)
vtkTable::GetNumberOfElements
virtual vtkIdType GetNumberOfElements(int type)
vtkTable::GetDataObjectType
int GetDataObjectType()
Definition: vtkTable.h:81