Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkXMLDataParser Class Reference

`#include <vtkXMLDataParser.h>`

Inheritance diagram for vtkXMLDataParser:

[legend]
Collaboration diagram for vtkXMLDataParser:

[legend]
List of all members.

## Detailed Description

Used by vtkXMLReader to parse VTK XML files.

Date:
  2002/12/31 21:58:34

Revision:
  1.5

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

Created by:
  - King, Brad

CVS contributions (if > 5%):
  - King, Brad (98%)

CVS logs (CVSweb):
  - .`h` (`/IO/vtkXMLDataParser.h)`
  - .`cxx` (`/IO/vtkXMLDataParser.cxx)`

Definition at line 51 of file vtkXMLDataParser.h.

## Public Types

typedef vtkXMLParser | Superclass
enum | { BigEndian, LittleEndian }

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
vtkXMLDataElement * | GetRootElement ()
unsigned long | GetWordTypeSize (int wordType)
virtual int | Parse ()
unsigned long | ReadInlineData (vtkXMLDataElement *element, int isAscii, void *buffer, int startWord, int numWords, int wordType)
unsigned long | ReadInlineData (vtkXMLDataElement *element, int isAscii, char *buffer, int startWord, int numWords)
unsigned long | ReadAppendedData (unsigned long offset, void *buffer, int startWord, int numWords, int wordType)
unsigned long | ReadAppendedData (unsigned long offset, char *buffer, int startWord, int numWords)
unsigned long | ReadAsciiData (void *buffer, int startWord, int numWords, int wordType)
unsigned long | ReadBinaryData (void *buffer, int startWord, int maxWords, int wordType)
virtual void | SetCompressor (vtkDataCompressor *)
virtual vtkDataCompressor * | GetCompressor ()

## Static Public Methods

int | IsTypeOf (const char *type)
vtkXMLDataParser * | SafeDownCast (vtkObject *o)
vtkXMLDataParser * | New ()

## Protected Methods

| 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 ()
void | ClearStreamEOF ()
int | CheckPrimaryAttributes ()
void | FindAppendedDataPosition ()
unsigned long | FindInlineDataPosition (unsigned long start)
int | ParseBuffer (const char *buffer, unsigned int count)
void | AddElement (vtkXMLDataElement *element)
void | PushOpenElement (vtkXMLDataElement *element)
vtkXMLDataElement * | PopOpenElement ()
void | PerformByteSwap (void *data, int 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)
unsigned long | ReadUncompressedData (unsigned char *data, unsigned long offset, unsigned long length)
unsigned long | ReadCompressedData (unsigned char *data, unsigned long offset, unsigned long length)
int | ParseAsciiData (int wordType)
void | FreeAsciiBuffer ()

## Protected Attributes

vtkXMLDataElement * | RootElement
vtkXMLDataElement ** | OpenElements
unsigned int | NumberOfOpenElements
unsigned int | OpenElementsSize
unsigned long | AppendedDataPosition
int | AppendedDataMatched
int | ByteOrder
vtkInputStream * | DataStream
vtkInputStream * | InlineDataStream
vtkInputStream * | AppendedDataStream
vtkDataCompressor * | Compressor
unsigned int | NumberOfBlocks
unsigned int | BlockUncompressedSize
unsigned int | PartialLastBlockUncompressedSize
unsigned int * | BlockCompressedSizes
unsigned long * | BlockStartOffsets
unsigned char * | AsciiDataBuffer
int | AsciiDataBufferLength
int | AsciiDataWordType
unsigned long | AsciiDataPosition

## Member Typedef Documentation

typedef vtkXMLParser vtkXMLDataParser::Superclass

| Reimplemented from vtkXMLParser. Definition at line 54 of file vtkXMLDataParser.h.

## Member Enumeration Documentation

anonymous enum

Enumerate big and little endian byte order settings.

Enumeration values:

  BigEndian |
  LittleEndian |

Definition at line 61 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.

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.

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.

vtkXMLDataParser* vtkXMLDataParser::New | ( |  | ) | `[static]`

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

vtkXMLDataElement* vtkXMLDataParser::GetRootElement | ( |  | ) |

| Get the root element from the XML document.

unsigned long vtkXMLDataParser::ReadInlineData | ( | vtkXMLDataElement * | element,
|  | int | isAscii,
|  | void * | buffer,
|  | int | startWord,
|  | int | numWords,
|  | int | wordType
| ) |

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

unsigned long vtkXMLDataParser::ReadInlineData | ( | vtkXMLDataElement * | element,
|  | int | isAscii,
|  | char * | buffer,
|  | int | startWord,
|  | int | numWords
| ) | `[inline]`

| Read inline data from inside the given element. Returns the number of words read. Definition at line 74 of file vtkXMLDataParser.h. References VTK_CHAR.

unsigned long vtkXMLDataParser::ReadAppendedData | ( | unsigned long | offset,
|  | void * | buffer,
|  | int | startWord,
|  | int | numWords,
|  | int | wordType
| ) |

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

unsigned long vtkXMLDataParser::ReadAppendedData | ( | unsigned long | offset,
|  | char * | buffer,
|  | int | startWord,
|  | int | numWords
| ) | `[inline]`

| Read from an appended data section starting at the given appended data offset. Returns the number of words read. Definition at line 85 of file vtkXMLDataParser.h. References VTK_CHAR.

unsigned long vtkXMLDataParser::ReadAsciiData | ( | void * | buffer,
|  | int | startWord,
|  | int | numWords,
|  | int | wordType
| ) |

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

unsigned long vtkXMLDataParser::ReadBinaryData | ( | void * | buffer,
|  | int | startWord,
|  | int | 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::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]`

| Parse the XML message. If length is specified, parse only the first "length" characters Reimplemented from vtkXMLParser.

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.

void vtkXMLDataParser::ClearStreamEOF | ( |  | ) | `[protected]`

int vtkXMLDataParser::CheckPrimaryAttributes | ( |  | ) | `[protected]`

void vtkXMLDataParser::FindAppendedDataPosition | ( |  | ) | `[protected]`

unsigned long vtkXMLDataParser::FindInlineDataPosition | ( | unsigned long | 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::PerformByteSwap | ( | void * | data,
|  | int | 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]`

unsigned long vtkXMLDataParser::ReadUncompressedData | ( | unsigned char * | data,
|  | unsigned long | offset,
|  | unsigned long | length
| ) | `[protected]`

unsigned long vtkXMLDataParser::ReadCompressedData | ( | unsigned char * | data,
|  | unsigned long | offset,
|  | unsigned long | length
| ) | `[protected]`

int vtkXMLDataParser::ParseAsciiData | ( | int | wordType | ) | `[protected]`

void vtkXMLDataParser::FreeAsciiBuffer | ( |  | ) | `[protected]`

## Member Data Documentation

vtkXMLDataElement* vtkXMLDataParser::RootElement`[protected]`

| Definition at line 157 of file vtkXMLDataParser.h.

vtkXMLDataElement** vtkXMLDataParser::OpenElements`[protected]`

| Definition at line 160 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::NumberOfOpenElements`[protected]`

| Definition at line 161 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::OpenElementsSize`[protected]`

| Definition at line 162 of file vtkXMLDataParser.h.

unsigned long vtkXMLDataParser::AppendedDataPosition`[protected]`

| Definition at line 165 of file vtkXMLDataParser.h.

int vtkXMLDataParser::AppendedDataMatched`[protected]`

| Definition at line 168 of file vtkXMLDataParser.h.

int vtkXMLDataParser::ByteOrder`[protected]`

| Definition at line 171 of file vtkXMLDataParser.h.

vtkInputStream* vtkXMLDataParser::DataStream`[protected]`

| Definition at line 175 of file vtkXMLDataParser.h.

vtkInputStream* vtkXMLDataParser::InlineDataStream`[protected]`

| Definition at line 179 of file vtkXMLDataParser.h.

vtkInputStream* vtkXMLDataParser::AppendedDataStream`[protected]`

| Definition at line 182 of file vtkXMLDataParser.h.

vtkDataCompressor* vtkXMLDataParser::Compressor`[protected]`

| Definition at line 185 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::NumberOfBlocks`[protected]`

| Definition at line 186 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::BlockUncompressedSize`[protected]`

| Definition at line 187 of file vtkXMLDataParser.h.

unsigned int vtkXMLDataParser::PartialLastBlockUncompressedSize`[protected]`

| Definition at line 188 of file vtkXMLDataParser.h.

unsigned int* vtkXMLDataParser::BlockCompressedSizes`[protected]`

| Definition at line 189 of file vtkXMLDataParser.h.

unsigned long* vtkXMLDataParser::BlockStartOffsets`[protected]`

| Definition at line 190 of file vtkXMLDataParser.h.

unsigned char* vtkXMLDataParser::AsciiDataBuffer`[protected]`

| Definition at line 193 of file vtkXMLDataParser.h.

int vtkXMLDataParser::AsciiDataBufferLength`[protected]`

| Definition at line 194 of file vtkXMLDataParser.h.

int vtkXMLDataParser::AsciiDataWordType`[protected]`

| Definition at line 195 of file vtkXMLDataParser.h.

unsigned long vtkXMLDataParser::AsciiDataPosition`[protected]`

| Definition at line 196 of file vtkXMLDataParser.h.

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

- IO/vtkXMLDataParser.h