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 "vtkDataObjectAlgorithm.h"
38 
40 {
41 public:
42  static vtkStringToNumeric* New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  vtkSetMacro(ConvertFieldData, bool);
49  vtkGetMacro(ConvertFieldData, bool);
50  vtkBooleanMacro(ConvertFieldData, bool);
52 
54 
55  vtkSetMacro(ConvertPointData, bool);
56  vtkGetMacro(ConvertPointData, bool);
57  vtkBooleanMacro(ConvertPointData, bool);
59 
61 
62  vtkSetMacro(ConvertCellData, bool);
63  vtkGetMacro(ConvertCellData, bool);
64  vtkBooleanMacro(ConvertCellData, bool);
66 
68 
69  virtual void SetConvertVertexData(bool b)
70  { this->SetConvertPointData(b); }
71  virtual bool GetConvertVertexData()
72  { return this->GetConvertPointData(); }
73  vtkBooleanMacro(ConvertVertexData, bool);
75 
77 
78  virtual void SetConvertEdgeData(bool b)
79  { this->SetConvertCellData(b); }
80  virtual bool GetConvertEdgeData()
81  { return this->GetConvertCellData(); }
82  vtkBooleanMacro(ConvertEdgeData, bool);
84 
86 
87  virtual void SetConvertRowData(bool b)
88  { this->SetConvertPointData(b); }
89  virtual bool GetConvertRowData()
90  { return this->GetConvertPointData(); }
91  vtkBooleanMacro(ConvertRowData, bool);
93 
95 
96  virtual int ProcessRequest(vtkInformation* request,
97  vtkInformationVector** inputVector,
98  vtkInformationVector* outputVector);
100 
101 protected:
104 
106 
107  virtual int RequestDataObject(vtkInformation* request,
108  vtkInformationVector** inputVector,
109  vtkInformationVector* outputVector);
111 
113  void ConvertArrays(vtkFieldData* fieldData);
114 
118 
122  int CountItemsToConvert(vtkFieldData *fieldData);
123 
124  // These keep track of our progress
127 
128  int RequestData(
129  vtkInformation*,
132 
133 private:
134  vtkStringToNumeric(const vtkStringToNumeric&); // Not implemented
135  void operator=(const vtkStringToNumeric&); // Not implemented
136 };
137 
138 #endif
139