vtkDelimitedTextReader Class Reference

#include <vtkDelimitedTextReader.h>

Inheritance diagram for vtkDelimitedTextReader:

Inheritance graph
[legend]
Collaboration diagram for vtkDelimitedTextReader:

Collaboration graph
[legend]

List of all members.


Detailed Description

reader for pulling in flat text files

vtkDelimitedTextReader is an interface for pulling in data from a flat, delimited text file (delimiter can be any character).

This class emits ProgressEvent for every 100 lines it reads.

Thanks:
Thanks to Andy Wilson and Brian Wylie from Sandia National Laboratories for implementing this class.
Warning:
This reader assumes that the first line in the file (whether that's headers or the first document) contains at least as many fields as any other line in the file.
Events:
vtkCommand::ProgressEvent
Tests:
vtkDelimitedTextReader (Tests)

Definition at line 57 of file vtkDelimitedTextReader.h.


Public Types

typedef vtkTableAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual char * GetFileName ()
virtual void SetFileName (const char *)
virtual void SetFieldDelimiterCharacters (const char *)
virtual char * GetFieldDelimiterCharacters ()
virtual char GetStringDelimiter ()
virtual void SetStringDelimiter (char)
virtual void SetUseStringDelimiter (bool)
virtual bool GetUseStringDelimiter ()
virtual void UseStringDelimiterOn ()
virtual void UseStringDelimiterOff ()
virtual bool GetHaveHeaders ()
virtual void SetHaveHeaders (bool)
virtual void SetMergeConsecutiveDelimiters (bool)
virtual bool GetMergeConsecutiveDelimiters ()
virtual void MergeConsecutiveDelimitersOn ()
virtual void MergeConsecutiveDelimitersOff ()
virtual int GetMaxRecords ()
virtual void SetMaxRecords (int)
virtual void SetDetectNumericColumns (bool)
virtual bool GetDetectNumericColumns ()
virtual void DetectNumericColumnsOn ()
virtual void DetectNumericColumnsOff ()

Static Public Member Functions

static vtkDelimitedTextReaderNew ()
static int IsTypeOf (const char *type)
static vtkDelimitedTextReaderSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkDelimitedTextReader ()
 ~vtkDelimitedTextReader ()
int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void OpenFile ()

Protected Attributes

vtkDelimitedTextReaderInternals * Internals
char * FileName
char * FieldDelimiterCharacters
char StringDelimiter
bool UseStringDelimiter
bool HaveHeaders
bool MergeConsecutiveDelimiters
char * ReadBuffer
int MaxRecords
bool DetectNumericColumns

Member Typedef Documentation

Reimplemented from vtkTableAlgorithm.

Definition at line 61 of file vtkDelimitedTextReader.h.


Constructor & Destructor Documentation

vtkDelimitedTextReader::vtkDelimitedTextReader (  )  [protected]

vtkDelimitedTextReader::~vtkDelimitedTextReader (  )  [protected]


Member Function Documentation

static vtkDelimitedTextReader* vtkDelimitedTextReader::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkTableAlgorithm.

virtual const char* vtkDelimitedTextReader::GetClassName (  )  [virtual]

Reimplemented from vtkTableAlgorithm.

static int vtkDelimitedTextReader::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkTableAlgorithm.

virtual int vtkDelimitedTextReader::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkTableAlgorithm.

static vtkDelimitedTextReader* vtkDelimitedTextReader::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkTableAlgorithm.

void vtkDelimitedTextReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkTableAlgorithm.

virtual char* vtkDelimitedTextReader::GetFileName (  )  [virtual]

virtual void vtkDelimitedTextReader::SetFileName ( const char *   )  [virtual]

virtual void vtkDelimitedTextReader::SetFieldDelimiterCharacters ( const char *   )  [virtual]

Get/set the characters that will be used to separate fields. For example, set this to "," for a comma-separated value file. Set it to ".:;" for a file where columns can be separated by a period, colon or semicolon. The order of the characters in the string does not matter. Defaults to a comma.

virtual char* vtkDelimitedTextReader::GetFieldDelimiterCharacters (  )  [virtual]

Get/set the characters that will be used to separate fields. For example, set this to "," for a comma-separated value file. Set it to ".:;" for a file where columns can be separated by a period, colon or semicolon. The order of the characters in the string does not matter. Defaults to a comma.

virtual char vtkDelimitedTextReader::GetStringDelimiter (  )  [virtual]

Get/set the character that will begin and end strings. Microsoft Excel, for example, will export the following format: "First Field","Second Field","Field, With, Commas","Fourth Field" The third field has a comma in it. By using a string delimiter, this will be correctly read. The delimiter defaults to '"'.

virtual void vtkDelimitedTextReader::SetStringDelimiter ( char   )  [virtual]

Get/set the character that will begin and end strings. Microsoft Excel, for example, will export the following format: "First Field","Second Field","Field, With, Commas","Fourth Field" The third field has a comma in it. By using a string delimiter, this will be correctly read. The delimiter defaults to '"'.

virtual void vtkDelimitedTextReader::SetUseStringDelimiter ( bool   )  [virtual]

Set/get whether to use the string delimiter. Defaults to on.

virtual bool vtkDelimitedTextReader::GetUseStringDelimiter (  )  [virtual]

Set/get whether to use the string delimiter. Defaults to on.

virtual void vtkDelimitedTextReader::UseStringDelimiterOn (  )  [virtual]

Set/get whether to use the string delimiter. Defaults to on.

virtual void vtkDelimitedTextReader::UseStringDelimiterOff (  )  [virtual]

Set/get whether to use the string delimiter. Defaults to on.

virtual bool vtkDelimitedTextReader::GetHaveHeaders (  )  [virtual]

Set/get whether to treat the first line of the file as headers.

virtual void vtkDelimitedTextReader::SetHaveHeaders ( bool   )  [virtual]

Set/get whether to treat the first line of the file as headers.

virtual void vtkDelimitedTextReader::SetMergeConsecutiveDelimiters ( bool   )  [virtual]

Set/get whether to merge successive delimiters. Use this if (for example) your fields are separated by spaces but you don't know exactly how many.

virtual bool vtkDelimitedTextReader::GetMergeConsecutiveDelimiters (  )  [virtual]

Set/get whether to merge successive delimiters. Use this if (for example) your fields are separated by spaces but you don't know exactly how many.

virtual void vtkDelimitedTextReader::MergeConsecutiveDelimitersOn (  )  [virtual]

Set/get whether to merge successive delimiters. Use this if (for example) your fields are separated by spaces but you don't know exactly how many.

virtual void vtkDelimitedTextReader::MergeConsecutiveDelimitersOff (  )  [virtual]

Set/get whether to merge successive delimiters. Use this if (for example) your fields are separated by spaces but you don't know exactly how many.

virtual int vtkDelimitedTextReader::GetMaxRecords (  )  [virtual]

Set/get the maximum number of records to read from the file (zero = unlimited)

virtual void vtkDelimitedTextReader::SetMaxRecords ( int   )  [virtual]

Set/get the maximum number of records to read from the file (zero = unlimited)

virtual void vtkDelimitedTextReader::SetDetectNumericColumns ( bool   )  [virtual]

When set to true, the reader will detect numeric columns and create vtkDoubleArray or vtkIntArray for those instead of vtkStringArray. Default is off.

virtual bool vtkDelimitedTextReader::GetDetectNumericColumns (  )  [virtual]

When set to true, the reader will detect numeric columns and create vtkDoubleArray or vtkIntArray for those instead of vtkStringArray. Default is off.

virtual void vtkDelimitedTextReader::DetectNumericColumnsOn (  )  [virtual]

When set to true, the reader will detect numeric columns and create vtkDoubleArray or vtkIntArray for those instead of vtkStringArray. Default is off.

virtual void vtkDelimitedTextReader::DetectNumericColumnsOff (  )  [virtual]

When set to true, the reader will detect numeric columns and create vtkDoubleArray or vtkIntArray for those instead of vtkStringArray. Default is off.

int vtkDelimitedTextReader::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkTableAlgorithm.

void vtkDelimitedTextReader::OpenFile (  )  [protected]


Member Data Documentation

vtkDelimitedTextReaderInternals* vtkDelimitedTextReader::Internals [protected]

Definition at line 129 of file vtkDelimitedTextReader.h.

Definition at line 138 of file vtkDelimitedTextReader.h.

Definition at line 139 of file vtkDelimitedTextReader.h.

Definition at line 140 of file vtkDelimitedTextReader.h.

Definition at line 141 of file vtkDelimitedTextReader.h.

Definition at line 142 of file vtkDelimitedTextReader.h.

Definition at line 143 of file vtkDelimitedTextReader.h.

Definition at line 144 of file vtkDelimitedTextReader.h.

Definition at line 145 of file vtkDelimitedTextReader.h.

Definition at line 146 of file vtkDelimitedTextReader.h.


The documentation for this class was generated from the following file:

Generated on Wed Jun 3 18:59:54 2009 for VTK by  doxygen 1.5.6