VTK
vtkDelimitedTextReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDelimitedTextReader.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 -------------------------------------------------------------------------*/
20 
21 
69 #ifndef __vtkDelimitedTextReader_h
70 #define __vtkDelimitedTextReader_h
71 
72 #include "vtkTableAlgorithm.h"
73 #include "vtkUnicodeString.h" // Needed for vtkUnicodeString
74 #include "vtkStdString.h" // Needed for vtkStdString
75 
77 {
78 public:
79  static vtkDelimitedTextReader* New();
81  void PrintSelf(ostream& os, vtkIndent indent);
82 
84 
85  vtkGetStringMacro(FileName);
86  vtkSetStringMacro(FileName);
88 
90 
98  vtkGetStringMacro(UnicodeCharacterSet);
99  vtkSetStringMacro(UnicodeCharacterSet);
101 
103 
106  void SetUTF8RecordDelimiters(const char* delimiters);
107  const char* GetUTF8RecordDelimiters();
108  void SetUnicodeRecordDelimiters(const vtkUnicodeString& delimiters);
109  vtkUnicodeString GetUnicodeRecordDelimiters();
111 
113 
118  vtkSetStringMacro(FieldDelimiterCharacters);
119  vtkGetStringMacro(FieldDelimiterCharacters);
121 
122  void SetUTF8FieldDelimiters(const char* delimiters);
123  const char* GetUTF8FieldDelimiters();
124  void SetUnicodeFieldDelimiters(const vtkUnicodeString& delimiters);
125  vtkUnicodeString GetUnicodeFieldDelimiters();
126 
128 
133  vtkGetMacro(StringDelimiter, char);
134  vtkSetMacro(StringDelimiter, char);
136 
137  void SetUTF8StringDelimiters(const char* delimiters);
138  const char* GetUTF8StringDelimiters();
139  void SetUnicodeStringDelimiters(const vtkUnicodeString& delimiters);
140  vtkUnicodeString GetUnicodeStringDelimiters();
141 
143 
144  vtkSetMacro(UseStringDelimiter, bool);
145  vtkGetMacro(UseStringDelimiter, bool);
146  vtkBooleanMacro(UseStringDelimiter, bool);
148 
150 
151  vtkGetMacro(HaveHeaders, bool);
152  vtkSetMacro(HaveHeaders, bool);
154 
156 
159  vtkSetMacro(MergeConsecutiveDelimiters, bool);
160  vtkGetMacro(MergeConsecutiveDelimiters, bool);
161  vtkBooleanMacro(MergeConsecutiveDelimiters, bool);
163 
165 
168  vtkGetMacro(MaxRecords, vtkIdType);
169  vtkSetMacro(MaxRecords, vtkIdType);
171 
173 
176  vtkSetMacro(DetectNumericColumns, bool);
177  vtkGetMacro(DetectNumericColumns, bool);
178  vtkBooleanMacro(DetectNumericColumns, bool);
180 
182 
185  vtkSetMacro(ForceDouble, bool);
186  vtkGetMacro(ForceDouble, bool);
187  vtkBooleanMacro(ForceDouble, bool);
189 
191 
200  vtkSetMacro(TrimWhitespacePriorToNumericConversion, bool);
201  vtkGetMacro(TrimWhitespacePriorToNumericConversion, bool);
202  vtkBooleanMacro(TrimWhitespacePriorToNumericConversion, bool);
204 
206 
209  vtkSetMacro(DefaultIntegerValue, int);
210  vtkGetMacro(DefaultIntegerValue, int);
212 
214 
217  vtkSetMacro(DefaultDoubleValue, double);
218  vtkGetMacro(DefaultDoubleValue, double);
220 
222 
224  vtkSetStringMacro(PedigreeIdArrayName);
225  vtkGetStringMacro(PedigreeIdArrayName);
227 
229 
231  vtkSetMacro(GeneratePedigreeIds, bool);
232  vtkGetMacro(GeneratePedigreeIds, bool);
233  vtkBooleanMacro(GeneratePedigreeIds, bool);
235 
237 
238  vtkSetMacro(OutputPedigreeIds, bool);
239  vtkGetMacro(OutputPedigreeIds, bool);
240  vtkBooleanMacro(OutputPedigreeIds, bool);
242 
246  vtkStdString GetLastError();
247 
249 
252  vtkSetMacro(ReplacementCharacter, vtkTypeUInt32);
253  vtkGetMacro(ReplacementCharacter, vtkTypeUInt32);
255 
256 //BTX
257 protected:
260 
261  int RequestData(
265 
266  char* FileName;
289  vtkTypeUInt32 ReplacementCharacter;
290 
291 private:
292  vtkDelimitedTextReader(const vtkDelimitedTextReader&); // Not implemented
293  void operator=(const vtkDelimitedTextReader&); // Not implemented
294 //ETX
295 };
296 
297 #endif
298