89#ifndef vtkDelimitedTextReader_h
90#define vtkDelimitedTextReader_h
92#include "vtkIOInfovisModule.h"
99VTK_ABI_NAMESPACE_BEGIN
126 vtkGetStringMacro(InputString);
128 vtkGetMacro(InputStringLength,
int);
131 this->SetInputString(input.c_str(),
static_cast<int>(input.length()));
157 vtkGetStringMacro(UnicodeCharacterSet);
158 vtkSetStringMacro(UnicodeCharacterSet);
179 vtkSetStringMacro(FieldDelimiterCharacters);
180 vtkGetStringMacro(FieldDelimiterCharacters);
196 vtkGetMacro(StringDelimiter,
char);
197 vtkSetMacro(StringDelimiter,
char);
207 vtkSetMacro(UseStringDelimiter,
bool);
208 vtkGetMacro(UseStringDelimiter,
bool);
209 vtkBooleanMacro(UseStringDelimiter,
bool);
217 vtkGetMacro(HaveHeaders,
bool);
218 vtkSetMacro(HaveHeaders,
bool);
227 vtkSetMacro(MergeConsecutiveDelimiters,
bool);
228 vtkGetMacro(MergeConsecutiveDelimiters,
bool);
229 vtkBooleanMacro(MergeConsecutiveDelimiters,
bool);
252 vtkSetMacro(DetectNumericColumns,
bool);
253 vtkGetMacro(DetectNumericColumns,
bool);
254 vtkBooleanMacro(DetectNumericColumns,
bool);
263 vtkSetMacro(ForceDouble,
bool);
264 vtkGetMacro(ForceDouble,
bool);
265 vtkBooleanMacro(ForceDouble,
bool);
284 vtkSetMacro(TrimWhitespacePriorToNumericConversion,
bool);
285 vtkGetMacro(TrimWhitespacePriorToNumericConversion,
bool);
286 vtkBooleanMacro(TrimWhitespacePriorToNumericConversion,
bool);
294 vtkSetMacro(DefaultIntegerValue,
int);
295 vtkGetMacro(DefaultIntegerValue,
int);
303 vtkSetMacro(DefaultDoubleValue,
double);
304 vtkGetMacro(DefaultDoubleValue,
double);
312 vtkSetStringMacro(PedigreeIdArrayName);
313 vtkGetStringMacro(PedigreeIdArrayName);
321 vtkSetMacro(GeneratePedigreeIds,
bool);
322 vtkGetMacro(GeneratePedigreeIds,
bool);
323 vtkBooleanMacro(GeneratePedigreeIds,
bool);
330 vtkSetMacro(OutputPedigreeIds,
bool);
331 vtkGetMacro(OutputPedigreeIds,
bool);
332 vtkBooleanMacro(OutputPedigreeIds,
bool);
341 vtkSetMacro(AddTabFieldDelimiter,
bool);
342 vtkGetMacro(AddTabFieldDelimiter,
bool);
343 vtkBooleanMacro(AddTabFieldDelimiter,
bool);
359 vtkSetMacro(ReplacementCharacter, vtkTypeUInt32);
360 vtkGetMacro(ReplacementCharacter, vtkTypeUInt32);
369 vtkGetMacro(Preview, std::string);
390 char* FileName =
nullptr;
392 char* InputString =
nullptr;
393 int InputStringLength = 0;
394 char* UnicodeCharacterSet =
nullptr;
396 std::string UnicodeRecordDelimiters =
"\r\n";
397 std::string UnicodeFieldDelimiters =
",";
398 std::string UnicodeStringDelimiters =
"\"";
399 std::string UnicodeWhitespace =
" \t\r\n\v\f";
400 std::string UnicodeEscapeCharacter =
"\\";
401 bool DetectNumericColumns =
false;
402 bool ForceDouble =
false;
403 bool TrimWhitespacePriorToNumericConversion =
false;
404 int DefaultIntegerValue = 0;
405 double DefaultDoubleValue = 0.;
406 char* FieldDelimiterCharacters =
nullptr;
407 char StringDelimiter =
'"';
408 bool UseStringDelimiter =
true;
409 bool HaveHeaders =
false;
410 bool MergeConsecutiveDelimiters =
false;
411 char* PedigreeIdArrayName =
nullptr;
412 bool GeneratePedigreeIds =
true;
413 bool OutputPedigreeIds =
false;
414 bool AddTabFieldDelimiter =
false;
416 vtkTypeUInt32 ReplacementCharacter =
'x';
426 std::unique_ptr<std::istream> OpenStream();
432 void ReadBOM(std::istream* stream);
438 vtkTextCodec* CreateTextCodec(std::istream* input_stream);
reads in delimited ascii or unicode text files and outputs a vtkTable data structure.
void SetInputString(const char *in, int len)
Specify the InputString for use when reading from a character array.
int ReadData(vtkTable *output_table)
~vtkDelimitedTextReader() override
void SetUTF8RecordDelimiters(const char *delimiters)
Specify the character(s) that will be used to separate records.
vtkStdString GetLastError()
Returns a human-readable description of the most recent error, if any.
void SetInputString(const char *in)
Specify the InputString for use when reading from a character array.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetUTF8StringDelimiters(const char *delimiters)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGetFilePathMacro(FileName)
Specifies the delimited text file to be loaded.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
const char * GetUTF8StringDelimiters()
vtkSetFilePathMacro(FileName)
Specifies the delimited text file to be loaded.
static vtkDelimitedTextReader * New()
const char * GetUTF8RecordDelimiters()
Specify the character(s) that will be used to separate records.
void SetInputString(const vtkStdString &input)
Specify the InputString for use when reading from a character array.
const char * GetUTF8FieldDelimiters()
void SetUTF8FieldDelimiters(const char *delimiters)
a simple class to control print indentation
Wrapper around std::string to keep symbols short.
Superclass for algorithms that produce only vtkTables as output.
A table, which contains similar-typed columns of data.
Virtual class to act as an interface for all text codecs.