VTK
|
Used by vtkXMLReader to parse VTK XML files. More...
#include <vtkXMLDataParser.h>
Public Types | |
enum | { BigEndian, LittleEndian } |
typedef vtkXMLParser | Superclass |
typedef vtkIdType | OffsetType |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
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 () |
virtual void | CharacterDataHandler (const char *data, int length) |
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 vtkDataCompressor * | GetCompressor () |
virtual int | GetAbort () |
virtual void | SetAbort (int) |
virtual float | GetProgress () |
virtual void | SetProgress (float) |
virtual void | SetAttributesEncoding (int) |
virtual int | GetAttributesEncoding () |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | SetStream (istream *) |
virtual istream * | GetStream () |
long | TellG () |
void | SeekG (long position) |
virtual int | InitializeParser () |
virtual int | ParseChunk (const char *inputString, unsigned int length) |
virtual int | CleanupParser () |
virtual void | SetFileName (const char *) |
virtual char * | GetFileName () |
virtual void | SetIgnoreCharacterData (int) |
virtual int | GetIgnoreCharacterData () |
virtual void | SetEncoding (const char *) |
virtual char * | GetEncoding () |
![]() | |
virtual void | DebugOn () |
virtual void | DebugOff () |
unsigned char | GetDebug () |
void | SetDebug (unsigned char debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &os) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkXMLDataParser * | SafeDownCast (vtkObject *o) |
static vtkXMLDataParser * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkXMLParser * | SafeDownCast (vtkObject *o) |
static vtkXMLParser * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObject *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkXMLDataParser () | |
~vtkXMLDataParser () | |
virtual int | Parse (const char *) |
virtual int | Parse (const char *, unsigned int) |
virtual void | StartElement (const char *name, const char **atts) |
virtual 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) |
vtkXMLDataElement * | PopOpenElement () |
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) |
void | SeekInlineDataPosition (vtkXMLDataElement *element) |
int | ParseAsciiData (int wordType) |
void | FreeAsciiBuffer () |
void | UpdateProgress (float progress) |
![]() | |
vtkXMLParser () | |
~vtkXMLParser () | |
virtual int | CreateParser () |
virtual int | ParseXML () |
virtual void | ReportStrayAttribute (const char *element, const char *attr, const char *value) |
virtual void | ReportMissingAttribute (const char *element, const char *attr) |
virtual void | ReportBadAttribute (const char *element, const char *attr, const char *value) |
virtual void | ReportUnknownElement (const char *element) |
virtual void | ReportXmlParseError () |
unsigned long | GetXMLByteIndex () |
int | ParseBuffer (const char *buffer) |
![]() | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &os) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Additional Inherited Members | |
![]() | |
static int | IsSpace (char c) |
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.
Definition at line 40 of file vtkXMLDataParser.h.
Definition at line 43 of file vtkXMLDataParser.h.
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.
anonymous enum |
Enumerate big and little endian byte order settings.
Enumerator | |
---|---|
BigEndian | |
LittleEndian |
Definition at line 52 of file vtkXMLDataParser.h.
|
protected |
|
protected |
|
virtual |
Reimplemented from vtkXMLParser.
|
static |
|
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 vtkXMLParser.
|
static |
|
virtual |
|
static |
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.
|
inline |
Read inline data from inside the given element. Returns the number of words read.
Definition at line 66 of file vtkXMLDataParser.h.
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.
|
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.
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 |
Get/Set the compressor used to decompress binary and appended data after reading from the file.
|
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 |
Parse the XML input and check that the file is safe to read. Returns 1 for okay, 0 for error.
Reimplemented from vtkXMLParser.
|
virtual |
Get/Set flag to abort reading of data. This may be set by a progress event observer.
|
virtual |
Get/Set flag to abort reading of data. This may be set by a progress event observer.
|
virtual |
Get/Set progress of reading data. This may be checked by a progress event observer.
|
virtual |
Get/Set progress of reading data. This may be checked by a progress event observer.
|
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 |
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).
|
inlinevirtual |
If you need the text inside XMLElements, turn IgnoreCharacterData off. This method will then be called when the file is parsed, and the text will be stored in each XMLDataElement. VTK XML Readers store the information elsewhere, so the default is to ignore it.
Reimplemented from vtkXMLParser.
Definition at line 266 of file vtkXMLDataParser.h.
|
protectedvirtual |
Parse the XML message. If length is specified, parse only the first "length" characters
Reimplemented from vtkXMLParser.
|
protectedvirtual |
Parse the XML message. If length is specified, parse only the first "length" characters
Reimplemented from vtkXMLParser.
|
protectedvirtual |
Reimplemented from vtkXMLParser.
|
protectedvirtual |
Reimplemented from vtkXMLParser.
|
protectedvirtual |
Reimplemented from vtkXMLParser.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
Reimplemented from vtkXMLParser.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Definition at line 196 of file vtkXMLDataParser.h.
|
protected |
Definition at line 199 of file vtkXMLDataParser.h.
|
protected |
Definition at line 200 of file vtkXMLDataParser.h.
|
protected |
Definition at line 201 of file vtkXMLDataParser.h.
|
protected |
Definition at line 204 of file vtkXMLDataParser.h.
|
protected |
Definition at line 207 of file vtkXMLDataParser.h.
|
protected |
Definition at line 210 of file vtkXMLDataParser.h.
|
protected |
Definition at line 214 of file vtkXMLDataParser.h.
|
protected |
Definition at line 218 of file vtkXMLDataParser.h.
|
protected |
Definition at line 221 of file vtkXMLDataParser.h.
|
protected |
Definition at line 238 of file vtkXMLDataParser.h.
|
protected |
Definition at line 239 of file vtkXMLDataParser.h.
|
protected |
Definition at line 240 of file vtkXMLDataParser.h.
|
protected |
Definition at line 241 of file vtkXMLDataParser.h.
|
protected |
Definition at line 242 of file vtkXMLDataParser.h.
|
protected |
Definition at line 243 of file vtkXMLDataParser.h.
|
protected |
Definition at line 246 of file vtkXMLDataParser.h.
|
protected |
Definition at line 247 of file vtkXMLDataParser.h.
|
protected |
Definition at line 248 of file vtkXMLDataParser.h.
|
protected |
Definition at line 249 of file vtkXMLDataParser.h.
|
protected |
Definition at line 252 of file vtkXMLDataParser.h.
|
protected |
Definition at line 255 of file vtkXMLDataParser.h.
|
protected |
Definition at line 257 of file vtkXMLDataParser.h.