00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00046 #ifndef __vtkDelimitedTextReader_h
00047 #define __vtkDelimitedTextReader_h
00048
00049 #include "vtkTableAlgorithm.h"
00050
00051 class vtkTable;
00052
00053
00054 struct vtkDelimitedTextReaderInternals;
00055
00056
00057 class VTK_INFOVIS_EXPORT vtkDelimitedTextReader : public vtkTableAlgorithm
00058 {
00059 public:
00060 static vtkDelimitedTextReader* New();
00061 vtkTypeRevisionMacro(vtkDelimitedTextReader,vtkTableAlgorithm);
00062 void PrintSelf(ostream& os, vtkIndent indent);
00063
00064 vtkGetStringMacro(FileName);
00065 vtkSetStringMacro(FileName);
00066
00068
00073 vtkSetStringMacro(FieldDelimiterCharacters);
00074 vtkGetStringMacro(FieldDelimiterCharacters);
00076
00078
00083 vtkGetMacro(StringDelimiter, char);
00084 vtkSetMacro(StringDelimiter, char);
00086
00088
00089 vtkSetMacro(UseStringDelimiter, bool);
00090 vtkGetMacro(UseStringDelimiter, bool);
00091 vtkBooleanMacro(UseStringDelimiter, bool);
00093
00095
00096 vtkGetMacro(HaveHeaders,bool);
00097 vtkSetMacro(HaveHeaders,bool);
00099
00101
00104 vtkSetMacro(MergeConsecutiveDelimiters, bool);
00105 vtkGetMacro(MergeConsecutiveDelimiters, bool);
00106 vtkBooleanMacro(MergeConsecutiveDelimiters, bool);
00108
00110
00112 vtkGetMacro(MaxRecords, int);
00113 vtkSetMacro(MaxRecords, int);
00115
00117
00120 vtkSetMacro(DetectNumericColumns, bool);
00121 vtkGetMacro(DetectNumericColumns, bool);
00122 vtkBooleanMacro(DetectNumericColumns, bool);
00124
00125 protected:
00126 vtkDelimitedTextReader();
00127 ~vtkDelimitedTextReader();
00128
00129 vtkDelimitedTextReaderInternals* Internals;
00130
00131 int RequestData(
00132 vtkInformation*,
00133 vtkInformationVector**,
00134 vtkInformationVector*);
00135
00136 void OpenFile();
00137
00138 char* FileName;
00139 char *FieldDelimiterCharacters;
00140 char StringDelimiter;
00141 bool UseStringDelimiter;
00142 bool HaveHeaders;
00143 bool MergeConsecutiveDelimiters;
00144 char *ReadBuffer;
00145 int MaxRecords;
00146 bool DetectNumericColumns;
00147
00148 private:
00149 vtkDelimitedTextReader(const vtkDelimitedTextReader&);
00150 void operator=(const vtkDelimitedTextReader&);
00151 };
00152
00153 #endif
00154