00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00021 #ifndef __vtkPVXMLParser_h
00022 #define __vtkPVXMLParser_h
00023
00024 #include "vtkXMLParser.h"
00025
00026 class vtkPVXMLElement;
00027
00028 class VTK_EXPORT vtkPVXMLParser : public vtkXMLParser
00029 {
00030 public:
00031 vtkTypeRevisionMacro(vtkPVXMLParser,vtkXMLParser);
00032 void PrintSelf(ostream& os, vtkIndent indent);
00033 static vtkPVXMLParser* New();
00034
00036 void PrintXML(ostream& os);
00037
00039 vtkPVXMLElement* GetRootElement();
00040
00042
00043 vtkSetStringMacro(FileName);
00044 vtkGetStringMacro(FileName);
00046
00047 protected:
00048 vtkPVXMLParser();
00049 ~vtkPVXMLParser();
00050
00051 void StartElement(const char* name, const char** atts);
00052 void EndElement(const char* name);
00053 void CharacterDataHandler(const char* data, int length);
00054
00055 void AddElement(vtkPVXMLElement* element);
00056 void PushOpenElement(vtkPVXMLElement* element);
00057 vtkPVXMLElement* PopOpenElement();
00058
00059
00060 vtkPVXMLElement* RootElement;
00061
00062
00063 vtkPVXMLElement** OpenElements;
00064 unsigned int NumberOfOpenElements;
00065 unsigned int OpenElementsSize;
00066
00067
00068 unsigned int ElementIdIndex;
00069
00070
00071
00072 virtual int ParseXML();
00073
00074 private:
00075 vtkPVXMLParser(const vtkPVXMLParser&);
00076 void operator=(const vtkPVXMLParser&);
00077 };
00078
00079 #endif