00001 /*========================================================================= 00002 00003 Program: Slicer3 00004 Language: C++ 00005 Module: $HeadURL: http://svn.slicer.org/Slicer3/trunk/Applications/GUI/Slicer3.cxx $ 00006 Date: $Date: 2009-04-15 06:29:13 -0400 (Wed, 15 Apr 2009) $ 00007 Version: $Revision: 9206 $ 00008 00009 Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved. 00010 00011 See License.txt or http://www.slicer.org/copyright/copyright.txt for details. 00012 00013 ==========================================================================*/ 00016 00017 00018 #ifndef __vtkMRMLParser_h 00019 #define __vtkMRMLParser_h 00020 00021 #include <stack> 00022 00023 #include "vtkObjectFactory.h" 00024 #include "vtkXMLParser.h" 00025 00026 #include "vtkMRML.h" 00027 #include "vtkMRMLScene.h" 00028 00029 class VTK_MRML_EXPORT vtkMRMLParser : public vtkXMLParser 00030 { 00031 public: 00032 static vtkMRMLParser *New(); 00033 vtkTypeMacro(vtkMRMLParser,vtkCollection); 00034 //void PrintSelf(ostream& os, vtkIndent indent){} 00035 00036 vtkMRMLScene* GetMRMLScene() {return this->MRMLScene;}; 00037 void SetMRMLScene(vtkMRMLScene* scene) {this->MRMLScene = scene;}; 00038 00039 vtkCollection* GetNodeCollection() {return this->NodeCollection;}; 00040 void SetNodeCollection(vtkCollection* scene) {this->NodeCollection = scene;}; 00041 00042 protected: 00043 vtkMRMLParser() : MRMLScene(NULL),NodeCollection(NULL){}; 00044 ~vtkMRMLParser() {}; 00045 vtkMRMLParser(const vtkMRMLParser&); 00046 void operator=(const vtkMRMLParser&); 00047 00048 virtual void StartElement(const char* name, const char** atts); 00049 virtual void EndElement (const char *name); 00050 00051 private: 00052 vtkMRMLScene* MRMLScene; 00053 vtkCollection* NodeCollection; 00054 //BTX 00055 std::stack< vtkMRMLNode *> NodeStack; 00056 //ETX 00057 }; 00058 00059 #endif
1.6.1