VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkFixedWidthTextReader Class Reference

reader for pulling in text files with fixed-width fields More...

#include <vtkFixedWidthTextReader.h>

Inheritance diagram for vtkFixedWidthTextReader:
Inheritance graph
[legend]
Collaboration diagram for vtkFixedWidthTextReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkTableAlgorithm Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkFixedWidthTextReaderNewInstance () const
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 (vtkObjectBase *o)

Protected Member Functions

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

Protected Attributes

char * FileName
bool HaveHeaders
bool StripWhiteSpace
int FieldWidth

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 57 of file vtkFixedWidthTextReader.h.


Member Typedef Documentation

Reimplemented from vtkTableAlgorithm.

Definition at line 61 of file vtkFixedWidthTextReader.h.


Constructor & Destructor Documentation


Member Function Documentation

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

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.

Reimplemented from vtkTableAlgorithm.

virtual vtkObjectBase* vtkFixedWidthTextReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkTableAlgorithm.

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

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 99 of file vtkFixedWidthTextReader.h.

Definition at line 100 of file vtkFixedWidthTextReader.h.

Definition at line 101 of file vtkFixedWidthTextReader.h.

Definition at line 102 of file vtkFixedWidthTextReader.h.


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