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

Servers/Filters/vtkXMLPVDWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   ParaView
00004   Module:    $RCSfile: vtkXMLPVDWriter.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 =========================================================================*/
00022 #ifndef __vtkXMLPVDWriter_h
00023 #define __vtkXMLPVDWriter_h
00024 
00025 #include "vtkXMLWriter.h"
00026 
00027 class vtkCallbackCommand;
00028 class vtkXMLPVDWriterInternals;
00029 
00030 class VTK_EXPORT vtkXMLPVDWriter : public vtkXMLWriter
00031 {
00032 public:
00033   static vtkXMLPVDWriter* New();
00034   vtkTypeRevisionMacro(vtkXMLPVDWriter,vtkXMLWriter);
00035   void PrintSelf(ostream& os, vtkIndent indent);  
00036   
00038   virtual const char* GetDefaultFileExtension();
00039   
00041 
00043   vtkGetMacro(Piece, int);
00044   vtkSetMacro(Piece, int);
00046   
00048 
00049   vtkGetMacro(NumberOfPieces, int);
00050   vtkSetMacro(NumberOfPieces, int);
00052   
00054 
00056   vtkGetMacro(GhostLevel, int);
00057   vtkSetMacro(GhostLevel, int);
00059   
00061   void AddInput(vtkDataObject *);
00062 
00064 
00065   vtkGetMacro(WriteCollectionFile, int);
00066   virtual void SetWriteCollectionFile(int flag);
00068 
00069   // See the vtkAlgorithm for a desciption of what these do
00070   int ProcessRequest(vtkInformation*,
00071                      vtkInformationVector**,
00072                      vtkInformationVector*);
00073 
00074 protected:
00075   vtkXMLPVDWriter();
00076   ~vtkXMLPVDWriter();
00077   
00078   // see algorithm for more info
00079   virtual int FillInputPortInformation(int port, vtkInformation* info);
00080 
00081   // Replace vtkXMLWriter's writing driver method.
00082   int RequestData(vtkInformation*  , vtkInformationVector** , vtkInformationVector*);
00083   virtual int WriteData();
00084   virtual const char* GetDataSetName();
00085   
00086   // Methods to create the set of writers matching the set of inputs.
00087   void CreateWriters();
00088   vtkXMLWriter* GetWriter(int index);
00089   
00090   // Methods to help construct internal file names.
00091   void SplitFileName();
00092   const char* GetFilePrefix();
00093   const char* GetFilePath();
00094 
00095   // Methods to construct the list of entries for the collection file.
00096   void AppendEntry(const char* entry);
00097   void DeleteAllEntries();
00098   
00099   // Write the collection file if it is requested.
00100   int WriteCollectionFileIfRequested();
00101   
00102   // Make a directory.
00103   void MakeDirectory(const char* name);
00104   
00105   // Remove a directory.
00106   void RemoveADirectory(const char* name);
00107   
00108   // Internal implementation details.
00109   vtkXMLPVDWriterInternals* Internal;  
00110   
00111   // The piece number to write.
00112   int Piece;
00113   
00114   // The number of pieces into which the inputs are split.
00115   int NumberOfPieces;
00116   
00117   // The number of ghost levels to write for unstructured data.
00118   int GhostLevel;
00119   
00120   // Whether to write the collection file on this node.
00121   int WriteCollectionFile;
00122   int WriteCollectionFileInitialized;
00123   
00124   // Callback registered with the ProgressObserver.
00125   static void ProgressCallbackFunction(vtkObject*, unsigned long, void*,
00126                                        void*);
00127   // Progress callback from internal writer.
00128   virtual void ProgressCallback(vtkAlgorithm* w);
00129   
00130   // The observer to report progress from the internal writer.
00131   vtkCallbackCommand* ProgressObserver;  
00132   
00133   // Garbage collection support.
00134   virtual void ReportReferences(vtkGarbageCollector*);
00135 private:
00136   vtkXMLPVDWriter(const vtkXMLPVDWriter&);  // Not implemented.
00137   void operator=(const vtkXMLPVDWriter&);  // Not implemented.
00138 };
00139 
00140 #endif

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