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

Servers/Filters/vtkXMLCollectionReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkXMLCollectionReader.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 =========================================================================*/
00028 #ifndef __vtkXMLCollectionReader_h
00029 #define __vtkXMLCollectionReader_h
00030 
00031 #include "vtkXMLReader.h"
00032 
00033 class vtkXMLCollectionReaderInternals;
00034 
00035 class VTK_EXPORT vtkXMLCollectionReader : public vtkXMLReader
00036 {
00037 public:
00038   static vtkXMLCollectionReader* New();
00039   vtkTypeRevisionMacro(vtkXMLCollectionReader,vtkXMLReader);
00040   void PrintSelf(ostream& os, vtkIndent indent);
00041   
00043 
00046   virtual void SetRestriction(const char* name, const char* value);
00047   virtual const char* GetRestriction(const char* name);
00049   
00051 
00055   virtual void SetRestrictionAsIndex(const char* name, int index);
00056   virtual int GetRestrictionAsIndex(const char* name);
00058   
00060   virtual int GetNumberOfOutputs();
00061   
00064   virtual vtkDataSet* GetOutput(int index);
00065   
00068   int GetNumberOfAttributes();
00069   
00073   const char* GetAttributeName(int attribute);
00074   
00077   int GetAttributeIndex(const char* name);
00078   
00080   int GetNumberOfAttributeValues(int attribute);
00081   
00083 
00087   const char* GetAttributeValue(int attribute, int index);
00088   const char* GetAttributeValue(const char* name, int index);
00090   
00092 
00094   int GetAttributeValueIndex(int attribute, const char* value);
00095   int GetAttributeValueIndex(const char* name, const char* value);
00097 
00102   vtkXMLDataElement* GetOutputXMLDataElement(int index);
00103 protected:
00104   vtkXMLCollectionReader();
00105   ~vtkXMLCollectionReader();  
00106   
00107   // Get the name of the data set being read.
00108   virtual const char* GetDataSetName();
00109   
00110   // We need to replace MarkGeneratedOutputs to mark only the one
00111   // output from which the request came.
00112   virtual void MarkGeneratedOutputs(vtkDataObject* output);
00113 
00114   virtual int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
00115   virtual void SetupEmptyOutput();
00116   virtual int FillOutputPortInformation(int, vtkInformation* info);
00117 
00118   virtual int ProcessRequest(vtkInformation *request,
00119                              vtkInformationVector **inputVector,
00120                              vtkInformationVector *outputVector);
00121 
00122   virtual int RequestDataObject(vtkInformation *request,
00123                                 vtkInformationVector **inputVector,
00124                                 vtkInformationVector *outputVector);
00125   void SetupOutput(const char* filePath, int index, vtkInformation *outInfo);
00126 
00127   // Overload of vtkXMLReader function, so we can handle updating the
00128   // information on multiple outputs
00129   virtual int RequestInformation(vtkInformation *request,
00130     vtkInformationVector **inputVector, vtkInformationVector *outputVector);
00131 
00132   void ReadXMLData();
00133   
00134   // Callback registered with the InternalProgressObserver.
00135   static void InternalProgressCallbackFunction(vtkObject*, unsigned long, void*,
00136                                            void*);
00137   // Progress callback from XMLParser.
00138   virtual void InternalProgressCallback();
00139   
00140   // The observer to report progress from the internal readers.
00141   vtkCallbackCommand* InternalProgressObserver;
00142   
00143   // Internal implementation details.
00144   vtkXMLCollectionReaderInternals* Internal;
00145   
00146   void AddAttributeNameValue(const char* name, const char* value);
00147   
00148 private:
00149   vtkXMLCollectionReader(const vtkXMLCollectionReader&);  // Not implemented.
00150   void operator=(const vtkXMLCollectionReader&);  // Not implemented.
00151 };
00152 
00153 #endif

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