vtkFixedWidthTextReader Class Reference

#include <vtkFixedWidthTextReader.h>

Inheritance diagram for vtkFixedWidthTextReader:

Inheritance graph
[legend]
Collaboration diagram for vtkFixedWidthTextReader:

Collaboration graph
[legend]

List of all members.


Detailed Description

reader for pulling in text files with fixed-width fields

vtkFixedWidthTextReader reads in a table from a text file where each column occupies a certain number of characters.

This class emits ProgressEvent for every 100 lines it reads.

Warning:
This first version of the reader will assume that all fields have the same width. It also assumes that the first line in the file has at least as many fields (i.e. at least as many characters) as any other line in the file.
Thanks:
Thanks to Andy Wilson from Sandia National Laboratories for implementing this class.
Events:
vtkCommand::ProgressEvent
Tests:
vtkFixedWidthTextReader (Tests)

Definition at line 56 of file vtkFixedWidthTextReader.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 SetFieldWidth (int)
virtual int GetFieldWidth ()
virtual void SetStripWhiteSpace (bool)
virtual bool GetStripWhiteSpace ()
virtual void StripWhiteSpaceOn ()
virtual void StripWhiteSpaceOff ()
virtual bool GetHaveHeaders ()
virtual void SetHaveHeaders (bool)
virtual void HaveHeadersOn ()
virtual void HaveHeadersOff ()

Static Public Member Functions

static vtkFixedWidthTextReaderNew ()
static int IsTypeOf (const char *type)
static vtkFixedWidthTextReaderSafeDownCast (vtkObject *o)

Protected Member Functions

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

Protected Attributes

char * FileName
bool HaveHeaders
bool StripWhiteSpace
int FieldWidth

Member Typedef Documentation

Reimplemented from vtkTableAlgorithm.

Definition at line 60 of file vtkFixedWidthTextReader.h.


Constructor & Destructor Documentation

vtkFixedWidthTextReader::vtkFixedWidthTextReader (  )  [protected]

vtkFixedWidthTextReader::~vtkFixedWidthTextReader (  )  [protected]


Member Function Documentation

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

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

Reimplemented from vtkTableAlgorithm.

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

Reimplemented from vtkTableAlgorithm.

static int vtkFixedWidthTextReader::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkTableAlgorithm.

virtual int vtkFixedWidthTextReader::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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkTableAlgorithm.

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

Reimplemented from vtkTableAlgorithm.

void vtkFixedWidthTextReader::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* vtkFixedWidthTextReader::GetFileName (  )  [virtual]

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

virtual void vtkFixedWidthTextReader::SetFieldWidth ( int   )  [virtual]

Set/get the field width

virtual int vtkFixedWidthTextReader::GetFieldWidth (  )  [virtual]

Set/get the field width

virtual void vtkFixedWidthTextReader::SetStripWhiteSpace ( bool   )  [virtual]

If set, this flag will cause the reader to strip whitespace from the beginning and ending of each field. Defaults to off.

virtual bool vtkFixedWidthTextReader::GetStripWhiteSpace (  )  [virtual]

If set, this flag will cause the reader to strip whitespace from the beginning and ending of each field. Defaults to off.

virtual void vtkFixedWidthTextReader::StripWhiteSpaceOn (  )  [virtual]

If set, this flag will cause the reader to strip whitespace from the beginning and ending of each field. Defaults to off.

virtual void vtkFixedWidthTextReader::StripWhiteSpaceOff (  )  [virtual]

If set, this flag will cause the reader to strip whitespace from the beginning and ending of each field. Defaults to off.

virtual bool vtkFixedWidthTextReader::GetHaveHeaders (  )  [virtual]

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

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

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

virtual void vtkFixedWidthTextReader::HaveHeadersOn (  )  [virtual]

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

virtual void vtkFixedWidthTextReader::HaveHeadersOff (  )  [virtual]

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

int vtkFixedWidthTextReader::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 vtkFixedWidthTextReader::OpenFile (  )  [protected]


Member Data Documentation

Definition at line 98 of file vtkFixedWidthTextReader.h.

Definition at line 99 of file vtkFixedWidthTextReader.h.

Definition at line 100 of file vtkFixedWidthTextReader.h.

Definition at line 101 of file vtkFixedWidthTextReader.h.


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

Generated on Mon Sep 27 18:24:20 2010 for VTK by  doxygen 1.5.6