VTK
dox/IO/Export/vtkExporter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkExporter.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
00038 #ifndef __vtkExporter_h
00039 #define __vtkExporter_h
00040 
00041 #include "vtkIOExportModule.h" // For export macro
00042 #include "vtkObject.h"
00043 class vtkRenderWindow;
00044 
00045 class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
00046 {
00047 public:
00048   vtkTypeMacro(vtkExporter,vtkObject);
00049   void PrintSelf(ostream& os, vtkIndent indent);
00050 
00053   virtual void Write();
00054 
00056   void Update();
00057 
00059 
00060   virtual void SetRenderWindow(vtkRenderWindow*);
00061   vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00063 
00065 
00067   void SetInput(vtkRenderWindow *renWin) {this->SetRenderWindow(renWin);};
00068   vtkRenderWindow *GetInput() {return this->GetRenderWindow();};
00070 
00073   void SetStartWrite(void (*f)(void *), void *arg);
00074 
00077   void SetEndWrite(void (*f)(void *), void *arg);
00078 
00080   void SetStartWriteArgDelete(void (*f)(void *));
00081 
00083   void SetEndWriteArgDelete(void (*f)(void *));
00084 
00086   unsigned long GetMTime();
00087 
00088 protected:
00089   vtkExporter();
00090   ~vtkExporter();
00091 
00092   vtkRenderWindow *RenderWindow;
00093   virtual void WriteData() = 0;
00094 
00095   void (*StartWrite)(void *);
00096   void (*StartWriteArgDelete)(void *);
00097   void *StartWriteArg;
00098   void (*EndWrite)(void *);
00099   void (*EndWriteArgDelete)(void *);
00100   void *EndWriteArg;
00101 private:
00102   vtkExporter(const vtkExporter&);  // Not implemented.
00103   void operator=(const vtkExporter&);  // Not implemented.
00104 };
00105 
00106 #endif
00107 
00108