Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkXMLDataParser Class Reference

#include <vtkXMLDataParser.h>

Inheritance diagram for vtkXMLDataParser:

Inheritance graph
[legend]
Collaboration diagram for vtkXMLDataParser:

Collaboration graph
[legend]
List of all members.

Detailed Description

Used by vtkXMLReader to parse VTK XML files.

vtkXMLDataParser provides a subclass of vtkXMLParser that constructs a representation of an XML data format's file using vtkXMLDataElement to represent each XML element. This representation is then used by vtkXMLReader and its subclasses to traverse the structure of the file and extract data.

See also:
vtkXMLDataElement
Events:
vtkCommand::ProgressEvent

Definition at line 40 of file vtkXMLDataParser.h.

Public Types

typedef vtkXMLParser Superclass
typedef vtkIdType OffsetType
enum  { BigEndian, LittleEndian }

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
unsigned long GetWordTypeSize (int wordType)
vtkXMLDataElementGetRootElement ()
OffsetType ReadInlineData (vtkXMLDataElement *element, int isAscii, void *buffer, OffsetType startWord, OffsetType numWords, int wordType)
OffsetType ReadInlineData (vtkXMLDataElement *element, int isAscii, char *buffer, OffsetType startWord, OffsetType numWords)
OffsetType ReadAppendedData (OffsetType offset, void *buffer, OffsetType startWord, OffsetType numWords, int wordType)
OffsetType ReadAppendedData (OffsetType offset, char *buffer, OffsetType startWord, OffsetType numWords)
OffsetType ReadAsciiData (void *buffer, OffsetType startWord, OffsetType numWords, int wordType)
OffsetType ReadBinaryData (void *buffer, OffsetType startWord, OffsetType maxWords, int wordType)
virtual void SetCompressor (vtkDataCompressor *)
virtual vtkDataCompressorGetCompressor ()
virtual int Parse ()
virtual int GetAbort ()
virtual void SetAbort (int)
virtual float GetProgress ()
virtual void SetProgress (float)
virtual void SetAttributesEncoding (int)
virtual int GetAttributesEncoding ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkXMLDataParserSafeDownCast (vtkObject *o)
static vtkXMLDataParserNew ()

Protected Member Functions

 vtkXMLDataParser ()
 ~vtkXMLDataParser ()
virtual int Parse (const char *)
virtual int Parse (const char *, unsigned int)
void StartElement (const char *name, const char **atts)
void EndElement (const char *)
int ParsingComplete ()
int CheckPrimaryAttributes ()
void FindAppendedDataPosition ()
OffsetType FindInlineDataPosition (OffsetType start)
int ParseBuffer (const char *buffer, unsigned int count)
void AddElement (vtkXMLDataElement *element)
void PushOpenElement (vtkXMLDataElement *element)
vtkXMLDataElementPopOpenElement ()
void FreeAllElements ()
void PerformByteSwap (void *data, OffsetType numWords, int wordSize)
void ReadCompressionHeader ()
unsigned int FindBlockSize (unsigned int block)
int ReadBlock (unsigned int block, unsigned char *buffer)
unsigned char * ReadBlock (unsigned int block)
OffsetType ReadUncompressedData (unsigned char *data, OffsetType startWord, OffsetType numWords, int wordSize)
OffsetType ReadCompressedData (unsigned char *data, OffsetType startWord, OffsetType numWords, int wordSize)
int ParseAsciiData (int wordType)
void FreeAsciiBuffer ()
void UpdateProgress (float progress)

Protected Attributes

vtkXMLDataElementRootElement
vtkXMLDataElement ** OpenElements
unsigned int NumberOfOpenElements
unsigned int OpenElementsSize
OffsetType AppendedDataPosition
int AppendedDataMatched
int ByteOrder
vtkInputStreamDataStream
vtkInputStreamInlineDataStream
vtkInputStreamAppendedDataStream
vtkDataCompressorCompressor
unsigned int NumberOfBlocks
unsigned int BlockUncompressedSize
unsigned int PartialLastBlockUncompressedSize
HeaderType * BlockCompressedSizes
OffsetTypeBlockStartOffsets
unsigned char * AsciiDataBuffer
OffsetType AsciiDataBufferLength
int AsciiDataWordType
OffsetType AsciiDataPosition
float Progress
int Abort
int AttributesEncoding


Member Typedef Documentation

typedef vtkXMLParser vtkXMLDataParser::Superclass
 

Reimplemented from vtkXMLParser.

Definition at line 43 of file vtkXMLDataParser.h.

typedef vtkIdType vtkXMLDataParser::OffsetType
 

A type used for data sizes and offsets for stream i/o. Using vtkIdType should satisfy most users. This could be streamoff if it is deemed portable. It could also be split into OffsetType (streamoff) and PositionType (streampos).

Definition at line 58 of file vtkXMLDataParser.h.


Member Enumeration Documentation

anonymous enum
 

Enumerate big and little endian byte order settings.

Enumerator:
BigEndian 
LittleEndian 

Definition at line 52 of file vtkXMLDataParser.h.


Constructor & Destructor Documentation

vtkXMLDataParser::vtkXMLDataParser  )  [protected]
 

vtkXMLDataParser::~vtkXMLDataParser  )  [protected]
 


Member Function Documentation

virtual const char* vtkXMLDataParser::GetClassName  )  [virtual]
 

Reimplemented from vtkXMLParser.

static int vtkXMLDataParser::IsTypeOf const char *  type  )  [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 vtkXMLParser.

virtual int vtkXMLDataParser::IsA const char *  type  )  [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 vtkXMLParser.

static vtkXMLDataParser* vtkXMLDataParser::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkXMLParser.

void vtkXMLDataParser::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 vtkXMLParser.

static vtkXMLDataParser* vtkXMLDataParser::New  )  [static]
 

Get/Set the input stream.

Reimplemented from vtkXMLParser.

vtkXMLDataElement* vtkXMLDataParser::GetRootElement  ) 
 

Get the root element from the XML document.

OffsetType vtkXMLDataParser::ReadInlineData vtkXMLDataElement element,
int  isAscii,
void *  buffer,
OffsetType  startWord,
OffsetType  numWords,
int  wordType
 

Read inline data from inside the given element. Returns the number of words read.

OffsetType vtkXMLDataParser::ReadInlineData vtkXMLDataElement element,
int  isAscii,
char *  buffer,
OffsetType  startWord,
OffsetType  numWords
[inline]
 

Get the root element from the XML document.

Definition at line 66 of file vtkXMLDataParser.h.

References VTK_CHAR.

OffsetType vtkXMLDataParser::ReadAppendedData OffsetType  offset,
void *  buffer,
OffsetType  startWord,
OffsetType  numWords,
int  wordType
 

Read from an appended data section starting at the given appended data offset. Returns the number of words read.

OffsetType vtkXMLDataParser::ReadAppendedData OffsetType  offset,
char *  buffer,
OffsetType  startWord,
OffsetType  numWords
[inline]
 

Read from an appended data section starting at the given appended data offset. Returns the number of words read.

Definition at line 79 of file vtkXMLDataParser.h.

References VTK_CHAR.

OffsetType vtkXMLDataParser::ReadAsciiData void *  buffer,
OffsetType  startWord,
OffsetType  numWords,
int  wordType
 

Read from an ascii data section starting at the current position in the stream. Returns the number of words read.

OffsetType vtkXMLDataParser::ReadBinaryData void *  buffer,
OffsetType  startWord,
OffsetType  maxWords,
int  wordType
 

Read from a data section starting at the current position in the stream. Returns the number of words read.

virtual void vtkXMLDataParser::SetCompressor vtkDataCompressor  )  [virtual]
 

Get/Set the compressor used to decompress binary and appended data after reading from the file.

virtual vtkDataCompressor* vtkXMLDataParser::GetCompressor  )  [virtual]
 

Get/Set the compressor used to decompress binary and appended data after reading from the file.

unsigned long vtkXMLDataParser::GetWordTypeSize int  wordType  ) 
 

Get the size of a word of the given type.

virtual int vtkXMLDataParser::Parse  )  [virtual]
 

Parse the XML input and check that the file is safe to read. Returns 1 for okay, 0 for error.

Reimplemented from vtkXMLParser.

virtual int vtkXMLDataParser::GetAbort  )  [virtual]
 

Get/Set flag to abort reading of data. This may be set by a progress event observer.

virtual void vtkXMLDataParser::SetAbort int   )  [virtual]
 

Parse the XML input and check that the file is safe to read. Returns 1 for okay, 0 for error.

virtual float vtkXMLDataParser::GetProgress  )  [virtual]
 

Get/Set progress of reading data. This may be checked by a progress event observer.

virtual void vtkXMLDataParser::SetProgress float   )  [virtual]
 

Get/Set progress of reading data. This may be checked by a progress event observer.

virtual void vtkXMLDataParser::SetAttributesEncoding int   )  [virtual]
 

Get/Set the character encoding that will be used to set the attributes's encoding type of each vtkXMLDataElement created by this parser (i.e., the data element attributes will use that encoding internally). If set to VTK_ENCODING_NONE (default), the attribute encoding type will not be changed and will default to the vtkXMLDataElement default encoding type (see vtkXMLDataElement::AttributeEncoding).

virtual int vtkXMLDataParser::GetAttributesEncoding  )  [virtual]
 

Get/Set the character encoding that will be used to set the attributes's encoding type of each vtkXMLDataElement created by this parser (i.e., the data element attributes will use that encoding internally). If set to VTK_ENCODING_NONE (default), the attribute encoding type will not be changed and will default to the vtkXMLDataElement default encoding type (see vtkXMLDataElement::AttributeEncoding).

virtual int vtkXMLDataParser::Parse const char *   )  [protected, virtual]
 

Parse the XML message. If length is specified, parse only the first "length" characters

Reimplemented from vtkXMLParser.

virtual int vtkXMLDataParser::Parse const char *  ,
unsigned  int
[protected, virtual]
 

void vtkXMLDataParser::StartElement const char *  name,
const char **  atts
[protected, virtual]
 

Reimplemented from vtkXMLParser.

void vtkXMLDataParser::EndElement const char *   )  [protected, virtual]
 

Reimplemented from vtkXMLParser.

int vtkXMLDataParser::ParsingComplete  )  [protected, virtual]
 

Reimplemented from vtkXMLParser.

int vtkXMLDataParser::CheckPrimaryAttributes  )  [protected]
 

void vtkXMLDataParser::FindAppendedDataPosition  )  [protected]
 

OffsetType vtkXMLDataParser::FindInlineDataPosition OffsetType  start  )  [protected]
 

int vtkXMLDataParser::ParseBuffer const char *  buffer,
unsigned int  count
[protected, virtual]
 

Reimplemented from vtkXMLParser.

void vtkXMLDataParser::AddElement vtkXMLDataElement element  )  [protected]
 

void vtkXMLDataParser::PushOpenElement vtkXMLDataElement element  )  [protected]
 

vtkXMLDataElement* vtkXMLDataParser::PopOpenElement  )  [protected]
 

void vtkXMLDataParser::FreeAllElements  )  [protected]
 

void vtkXMLDataParser::PerformByteSwap void *  data,
OffsetType  numWords,
int  wordSize
[protected]
 

void vtkXMLDataParser::ReadCompressionHeader  )  [protected]
 

unsigned int vtkXMLDataParser::FindBlockSize unsigned int  block  )  [protected]
 

int vtkXMLDataParser::ReadBlock unsigned int  block,
unsigned char *  buffer
[protected]
 

unsigned char* vtkXMLDataParser::ReadBlock unsigned int  block  )  [protected]
 

OffsetType vtkXMLDataParser::ReadUncompressedData unsigned char *  data,
OffsetType  startWord,
OffsetType  numWords,
int  wordSize
[protected]
 

OffsetType vtkXMLDataParser::ReadCompressedData unsigned char *  data,
OffsetType  startWord,
OffsetType  numWords,
int  wordSize
[protected]
 

int vtkXMLDataParser::ParseAsciiData int  wordType  )  [protected]
 

void vtkXMLDataParser::FreeAsciiBuffer  )  [protected]
 

void vtkXMLDataParser::UpdateProgress float  progress  )  [protected]
 


Member Data Documentation

vtkXMLDataElement* vtkXMLDataParser::RootElement [protected]
 

Definition at line 186 of file vtkXMLDataParser.h.

vtkXMLDataElement** vtkXMLDataParser::OpenElements [protected]
 

Definition at line 189 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::NumberOfOpenElements [protected]
 

Definition at line 190 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::OpenElementsSize [protected]
 

Definition at line 191 of file vtkXMLDataParser.h.

OffsetType vtkXMLDataParser::AppendedDataPosition [protected]
 

Definition at line 194 of file vtkXMLDataParser.h.

int vtkXMLDataParser::AppendedDataMatched [protected]
 

Definition at line 197 of file vtkXMLDataParser.h.

int vtkXMLDataParser::ByteOrder [protected]
 

Definition at line 200 of file vtkXMLDataParser.h.

vtkInputStream* vtkXMLDataParser::DataStream [protected]
 

Definition at line 204 of file vtkXMLDataParser.h.

vtkInputStream* vtkXMLDataParser::InlineDataStream [protected]
 

Definition at line 208 of file vtkXMLDataParser.h.

vtkInputStream* vtkXMLDataParser::AppendedDataStream [protected]
 

Definition at line 211 of file vtkXMLDataParser.h.

vtkDataCompressor* vtkXMLDataParser::Compressor [protected]
 

Definition at line 228 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::NumberOfBlocks [protected]
 

Definition at line 229 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::BlockUncompressedSize [protected]
 

Definition at line 230 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::PartialLastBlockUncompressedSize [protected]
 

Definition at line 231 of file vtkXMLDataParser.h.

HeaderType* vtkXMLDataParser::BlockCompressedSizes [protected]
 

Definition at line 232 of file vtkXMLDataParser.h.

OffsetType* vtkXMLDataParser::BlockStartOffsets [protected]
 

Definition at line 233 of file vtkXMLDataParser.h.

unsigned char* vtkXMLDataParser::AsciiDataBuffer [protected]
 

Definition at line 236 of file vtkXMLDataParser.h.

OffsetType vtkXMLDataParser::AsciiDataBufferLength [protected]
 

Definition at line 237 of file vtkXMLDataParser.h.

int vtkXMLDataParser::AsciiDataWordType [protected]
 

Definition at line 238 of file vtkXMLDataParser.h.

OffsetType vtkXMLDataParser::AsciiDataPosition [protected]
 

Definition at line 239 of file vtkXMLDataParser.h.

float vtkXMLDataParser::Progress [protected]
 

Definition at line 242 of file vtkXMLDataParser.h.

int vtkXMLDataParser::Abort [protected]
 

Definition at line 245 of file vtkXMLDataParser.h.

int vtkXMLDataParser::AttributesEncoding [protected]
 

Definition at line 247 of file vtkXMLDataParser.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 22 00:32:10 2008 for VTK by  doxygen 1.4.3-20050530