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

Servers/Common/vtkCommandOptionsXMLParser.h

Go to the documentation of this file.
00001 /*=========================================================================
00002   
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkCommandOptionsXMLParser.h,v $
00005 
00006   Copyright (c) Kitware, Inc.
00007   All rights reserved.
00008   See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00024 #ifndef __vtkCommandOptionsXMLParser_h
00025 #define __vtkCommandOptionsXMLParser_h
00026 
00027 #include "vtkXMLParser.h"
00028 #include "vtkCommandOptions.h" // for enum
00029 class vtkCommandOptionsXMLParserInternal;
00030 class vtkCommandOptions;
00031 
00032 class VTK_EXPORT vtkCommandOptionsXMLParser : public vtkXMLParser
00033 {
00034 public:
00035   static vtkCommandOptionsXMLParser* New();
00036   vtkTypeRevisionMacro(vtkCommandOptionsXMLParser,vtkXMLParser);
00037   void PrintSelf(ostream& os, vtkIndent indent);
00038 
00040 
00043   void AddBooleanArgument(const char* longarg, int* var, int type=0);
00044   void AddArgument(const char* longarg, int* var, int type=0);
00045   void AddArgument(const char* longarg, char** var, int type=0);
00046   void SetPVOptions(vtkCommandOptions* o) 
00047     {
00048       this->PVOptions = o;
00049     }
00051 protected:
00053   vtkCommandOptionsXMLParser();
00054 
00056   virtual ~vtkCommandOptionsXMLParser();
00057 
00058   // Called when a new element is opened in the XML source.  Should be
00059   // replaced by subclasses to handle each element.
00060   //  name = Name of new element.
00061   //  atts = Null-terminated array of attribute name/value pairs.
00062   //         Even indices are attribute names, and odd indices are values.
00063   virtual void StartElement(const char* name, const char** atts);
00064 
00065   // Called at the end of an element in the XML source opened when
00066   // StartElement was called.
00067   virtual void EndElement(const char* name);  
00068   // Call to process the .. of  <Option>...</>
00069   void HandleOption(const char** atts);
00070   // Call to process the .. of  <Option>...</>
00071   void HandleProcessType(const char** atts);
00072 
00073   virtual void SetProcessType(const char* ptype);
00074   void SetProcessTypeInt(int ptype);
00075 
00076 private:
00077   vtkCommandOptionsXMLParser(const vtkCommandOptionsXMLParser&); // Not implemented
00078   void operator=(const vtkCommandOptionsXMLParser&); // Not implemented
00079   int InPVXTag;
00080   vtkCommandOptions* PVOptions;
00081   vtkCommandOptionsXMLParserInternal* Internals;
00082 };
00083 
00084 #endif // #ifndef __vtkCommandOptionsXMLParser_h
00085 

Generated on Tue May 30 12:31:45 2006 for ParaView by doxygen 1.3.5