VTK
vtkExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExporter.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
39 #ifndef vtkExporter_h
40 #define vtkExporter_h
41 
42 #include "vtkIOExportModule.h" // For export macro
43 #include "vtkObject.h"
44 class vtkRenderWindow;
45 
46 class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
47 {
48 public:
49  vtkTypeMacro(vtkExporter,vtkObject);
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
56  virtual void Write();
57 
61  void Update();
62 
64 
67  virtual void SetRenderWindow(vtkRenderWindow*);
68  vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
70 
72 
76  void SetInput(vtkRenderWindow *renWin) {this->SetRenderWindow(renWin);};
79 
84  void SetStartWrite(void (*f)(void *), void *arg);
85 
90  void SetEndWrite(void (*f)(void *), void *arg);
91 
95  void SetStartWriteArgDelete(void (*f)(void *));
96 
100  void SetEndWriteArgDelete(void (*f)(void *));
101 
106 
107 protected:
108  vtkExporter();
109  ~vtkExporter();
110 
112  virtual void WriteData() = 0;
113 
114  void (*StartWrite)(void *);
115  void (*StartWriteArgDelete)(void *);
117  void (*EndWrite)(void *);
118  void (*EndWriteArgDelete)(void *);
119  void *EndWriteArg;
120 private:
121  vtkExporter(const vtkExporter&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkExporter&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
126 
127 
abstract class to write a scene to a file
Definition: vtkExporter.h:46
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void * StartWriteArg
Definition: vtkExporter.h:116
vtkRenderWindow * GetRenderWindow()
virtual void SetRenderWindow(vtkRenderWindow *renwin)
virtual void Update()
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkWeakPointer< vtkRenderWindow > RenderWindow
create a window for renderers to draw into
vtkRenderWindow * RenderWindow
Definition: vtkExporter.h:111
vtkRenderWindow * GetInput()
These methods are provided for backward compatibility.
Definition: vtkExporter.h:77
void * EndWriteArg
Definition: vtkExporter.h:119
void SetInput(vtkRenderWindow *renWin)
These methods are provided for backward compatibility.
Definition: vtkExporter.h:76