VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
XML
vtkXMLCompositeDataWriter.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: ParaView
4
Module: vtkXMLCompositeDataWriter.h
5
6
Copyright (c) Kitware, Inc.
7
All rights reserved.
8
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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
=========================================================================*/
25
#ifndef __vtkXMLCompositeDataWriter_h
26
#define __vtkXMLCompositeDataWriter_h
27
28
#include "vtkIOXMLModule.h"
// For export macro
29
#include "
vtkXMLWriter.h
"
30
#include "
vtkStdString.h
"
// needed for vtkStdString.
31
32
class
vtkCallbackCommand
;
33
class
vtkCompositeDataSet
;
34
class
vtkXMLDataElement
;
35
class
vtkXMLCompositeDataWriterInternals;
36
37
class
VTKIOXML_EXPORT
vtkXMLCompositeDataWriter
:
public
vtkXMLWriter
38
{
39
public
:
40
vtkTypeMacro(
vtkXMLCompositeDataWriter
,
vtkXMLWriter
);
41
void
PrintSelf
(ostream& os,
vtkIndent
indent);
42
44
virtual
const
char
*
GetDefaultFileExtension
();
45
50
vtkGetMacro(GhostLevel,
int
);
51
vtkSetMacro(GhostLevel,
int
);
53
55
56
vtkGetMacro(WriteMetaFile,
int
);
57
virtual
void
SetWriteMetaFile(
int
flag);
59
61
62
int
ProcessRequest
(
vtkInformation
*,
63
vtkInformationVector
**,
64
vtkInformationVector
*);
66
67
protected
:
68
vtkXMLCompositeDataWriter
();
69
~
vtkXMLCompositeDataWriter
();
70
72
75
virtual
int
GetDataSetMajorVersion
() {
return
1; }
76
virtual
int
GetDataSetMinorVersion
() {
return
0; }
78
80
vtkStdString
CreatePieceFileName(
int
Piece);
81
82
// see algorithm for more info
83
virtual
int
FillInputPortInformation
(
int
port
,
vtkInformation
*
info
);
84
85
int
RequestData
(
86
vtkInformation
* ,
vtkInformationVector
** ,
vtkInformationVector
*);
87
int
RequestUpdateExtent(
88
vtkInformation
* ,
vtkInformationVector
** ,
vtkInformationVector
*);
89
90
virtual
int
WriteData
();
91
virtual
const
char
*
GetDataSetName
();
92
93
// Create a default executive.
94
virtual
vtkExecutive
*
CreateDefaultExecutive
();
95
96
vtkInformation
*
InputInformation
;
97
99
virtual
void
FillDataTypes(
vtkCompositeDataSet
*);
100
102
unsigned
int
GetNumberOfDataTypes();
103
105
int
* GetDataTypesPointer();
106
107
// Methods to create the set of writers matching the set of inputs.
108
void
CreateWriters(
vtkCompositeDataSet
*);
109
vtkXMLWriter
* GetWriter(
int
index
);
110
111
// Methods to help construct internal file names.
112
void
SplitFileName();
113
const
char
* GetFilePrefix();
114
const
char
* GetFilePath();
115
119
int
WriteMetaFileIfRequested();
120
121
// Make a directory.
122
void
MakeDirectory(
const
char
*
name
);
123
124
// Remove a directory.
125
void
RemoveADirectory(
const
char
*
name
);
126
127
// Internal implementation details.
128
vtkXMLCompositeDataWriterInternals*
Internal
;
129
130
// The number of ghost levels to write for unstructured data.
131
int
GhostLevel
;
132
136
int
WriteMetaFile
;
137
138
// Callback registered with the ProgressObserver.
139
static
void
ProgressCallbackFunction(
vtkObject
*,
unsigned
long
,
void
*,
140
void
*);
141
// Progress callback from internal writer.
142
virtual
void
ProgressCallback(
vtkAlgorithm
* w);
143
144
// The observer to report progress from the internal writer.
145
vtkCallbackCommand
*
ProgressObserver
;
146
147
// Garbage collection support.
148
virtual
void
ReportReferences
(
vtkGarbageCollector
*);
149
151
157
virtual
int
WriteComposite(
vtkCompositeDataSet
* compositeData,
158
vtkXMLDataElement
* element,
int
&writerIdx)=0;
160
162
169
virtual
int
WriteNonCompositeData(
170
vtkDataObject
* dObj,
vtkXMLDataElement
* element,
171
int
& writerIdx,
const
char
* FileName);
173
176
virtual
void
RemoveWrittenFiles(
const
char
* SubDirectory);
177
178
private
:
179
vtkXMLCompositeDataWriter
(
const
vtkXMLCompositeDataWriter
&);
// Not implemented.
180
void
operator=(
const
vtkXMLCompositeDataWriter
&);
// Not implemented.
181
};
182
183
#endif
Generated on Fri May 25 2012 22:39:32 for VTK by
1.8.1