00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00050 #ifndef __vtkTable_h
00051 #define __vtkTable_h
00052
00053 #include "vtkDataObject.h"
00054
00055 class vtkAbstractArray;
00056 class vtkVariant;
00057 class vtkVariantArray;
00058
00059 class VTK_FILTERING_EXPORT vtkTable : public vtkDataObject
00060 {
00061 public:
00062 static vtkTable* New();
00063 vtkTypeRevisionMacro(vtkTable, vtkDataObject);
00064 void PrintSelf(ostream &os, vtkIndent indent);
00065
00067 int GetDataObjectType() {return VTK_TABLE;}
00068
00070 virtual void SetFieldData(vtkFieldData* data);
00071
00072
00073
00074
00075
00077 vtkIdType GetNumberOfRows();
00078
00081 vtkVariantArray* GetRow(vtkIdType row);
00082
00085 void GetRow(vtkIdType row, vtkVariantArray *values);
00086
00089 void SetRow(vtkIdType row, vtkVariantArray *values);
00090
00092 vtkIdType InsertNextBlankRow();
00093
00096 vtkIdType InsertNextRow(vtkVariantArray* arr);
00097
00100 void RemoveRow(vtkIdType row);
00101
00102
00103
00104
00105
00107 vtkIdType GetNumberOfColumns();
00108
00110 const char* GetColumnName(vtkIdType col);
00111
00113 vtkAbstractArray* GetColumnByName(const char* name);
00114
00116 vtkAbstractArray* GetColumn(vtkIdType col);
00117
00119 void AddColumn(vtkAbstractArray* arr);
00120
00122 void RemoveColumnByName(const char* name);
00123
00125 void RemoveColumn(vtkIdType col);
00126
00127
00128
00129
00130
00131
00136 vtkVariant GetValue(vtkIdType row, vtkIdType col);
00137
00140 vtkVariant GetValueByName(vtkIdType row, const char* col);
00141
00143 void SetValue(vtkIdType row, vtkIdType col, vtkVariant value);
00144
00146
00147 void SetValueByName(vtkIdType row, const char* col, vtkVariant value);
00148
00150
00152 virtual void Initialize();
00153
00155
00156 static vtkTable* GetData(vtkInformation* info);
00157 static vtkTable* GetData(vtkInformationVector* v, int i=0);
00159
00160 virtual void ShallowCopy(vtkDataObject* src);
00161
00162 protected:
00163 vtkTable();
00164 ~vtkTable();
00165
00167 vtkVariantArray *RowArray;
00168
00170 vtkIdType Rows;
00171
00172 private:
00173 vtkTable(const vtkTable&);
00174 void operator=(const vtkTable&);
00175 };
00176
00177 #endif
00178