VTK
vtkStringToNumeric.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkStringToNumeric.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 -------------------------------------------------------------------------*/
34 #ifndef vtkStringToNumeric_h
35 #define vtkStringToNumeric_h
36 
37 #include "vtkInfovisCoreModule.h" // For export macro
38 #include "vtkDataObjectAlgorithm.h"
39 
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
50  vtkSetMacro(ForceDouble, bool);
51  vtkGetMacro(ForceDouble, bool);
52  vtkBooleanMacro(ForceDouble, bool);
54 
56 
57  vtkSetMacro(DefaultIntegerValue, int);
58  vtkGetMacro(DefaultIntegerValue, int);
60 
62 
63  vtkSetMacro(DefaultDoubleValue, double);
64  vtkGetMacro(DefaultDoubleValue, double);
66 
68 
77  vtkSetMacro(TrimWhitespacePriorToNumericConversion, bool);
78  vtkGetMacro(TrimWhitespacePriorToNumericConversion, bool);
79  vtkBooleanMacro(TrimWhitespacePriorToNumericConversion, bool);
81 
83 
84  vtkSetMacro(ConvertFieldData, bool);
85  vtkGetMacro(ConvertFieldData, bool);
86  vtkBooleanMacro(ConvertFieldData, bool);
88 
90 
91  vtkSetMacro(ConvertPointData, bool);
92  vtkGetMacro(ConvertPointData, bool);
93  vtkBooleanMacro(ConvertPointData, bool);
95 
97 
98  vtkSetMacro(ConvertCellData, bool);
99  vtkGetMacro(ConvertCellData, bool);
100  vtkBooleanMacro(ConvertCellData, bool);
102 
104 
105  virtual void SetConvertVertexData(bool b)
106  { this->SetConvertPointData(b); }
107  virtual bool GetConvertVertexData()
108  { return this->GetConvertPointData(); }
109  vtkBooleanMacro(ConvertVertexData, bool);
111 
113 
114  virtual void SetConvertEdgeData(bool b)
115  { this->SetConvertCellData(b); }
116  virtual bool GetConvertEdgeData()
117  { return this->GetConvertCellData(); }
118  vtkBooleanMacro(ConvertEdgeData, bool);
120 
122 
123  virtual void SetConvertRowData(bool b)
124  { this->SetConvertPointData(b); }
125  virtual bool GetConvertRowData()
126  { return this->GetConvertPointData(); }
127  vtkBooleanMacro(ConvertRowData, bool);
129 
131 
132  virtual int ProcessRequest(vtkInformation* request,
133  vtkInformationVector** inputVector,
134  vtkInformationVector* outputVector);
136 
137 protected:
140 
142 
143  virtual int RequestDataObject(vtkInformation* request,
144  vtkInformationVector** inputVector,
145  vtkInformationVector* outputVector);
147 
149  void ConvertArrays(vtkFieldData* fieldData);
150 
158 
163 
164  // These keep track of our progress
167 
172 
173 private:
174  vtkStringToNumeric(const vtkStringToNumeric&); // Not implemented
175  void operator=(const vtkStringToNumeric&); // Not implemented
176 };
177 
178 #endif
179 
vtkStringToNumeric::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
VTKINFOVISCORE_EXPORT
#define VTKINFOVISCORE_EXPORT
Definition: vtkInfovisCoreModule.h:15
vtkStringToNumeric::vtkStringToNumeric
vtkStringToNumeric()
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkStringToNumeric::DefaultDoubleValue
double DefaultDoubleValue
Definition: vtkStringToNumeric.h:156
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkStringToNumeric::SetConvertVertexData
virtual void SetConvertVertexData(bool b)
Definition: vtkStringToNumeric.h:105
vtkStringToNumeric::ConvertPointData
bool ConvertPointData
Definition: vtkStringToNumeric.h:152
vtkDataObjectAlgorithm
Superclass for algorithms that produce only data object as output.
Definition: vtkDataObjectAlgorithm.h:43
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkStringToNumeric::TrimWhitespacePriorToNumericConversion
bool TrimWhitespacePriorToNumericConversion
Definition: vtkStringToNumeric.h:157
vtkStringToNumeric::~vtkStringToNumeric
~vtkStringToNumeric()
vtkFieldData
represent and manipulate fields of data
Definition: vtkFieldData.h:56
vtkStringToNumeric
Converts string arrays to numeric arrays.
Definition: vtkStringToNumeric.h:41
vtkStringToNumeric::SetConvertEdgeData
virtual void SetConvertEdgeData(bool b)
Definition: vtkStringToNumeric.h:114
vtkStringToNumeric::GetConvertVertexData
virtual bool GetConvertVertexData()
Definition: vtkStringToNumeric.h:107
vtkStringToNumeric::GetConvertRowData
virtual bool GetConvertRowData()
Definition: vtkStringToNumeric.h:125
vtkStringToNumeric::RequestDataObject
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkStringToNumeric::ConvertFieldData
bool ConvertFieldData
Definition: vtkStringToNumeric.h:151
vtkStringToNumeric::ItemsToConvert
int ItemsToConvert
Definition: vtkStringToNumeric.h:165
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkStringToNumeric::ConvertCellData
bool ConvertCellData
Definition: vtkStringToNumeric.h:153
vtkStringToNumeric::DefaultIntegerValue
int DefaultIntegerValue
Definition: vtkStringToNumeric.h:155
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkStringToNumeric::ItemsConverted
int ItemsConverted
Definition: vtkStringToNumeric.h:166
vtkStringToNumeric::New
static vtkStringToNumeric * New()
vtkInfovisCoreModule.h
vtkStringToNumeric::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkStringToNumeric::CountItemsToConvert
int CountItemsToConvert(vtkFieldData *fieldData)
vtkStringToNumeric::ConvertArrays
void ConvertArrays(vtkFieldData *fieldData)
vtkStringToNumeric::SetConvertRowData
virtual void SetConvertRowData(bool b)
Definition: vtkStringToNumeric.h:123
vtkDataObjectAlgorithm.h
vtkStringToNumeric::ForceDouble
bool ForceDouble
Definition: vtkStringToNumeric.h:154
vtkStringToNumeric::GetConvertEdgeData
virtual bool GetConvertEdgeData()
Definition: vtkStringToNumeric.h:116
vtkStringToNumeric::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)