VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
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 "
vtkXMLWriter.h
"
29
#include "
vtkStdString.h
"
// needed for vtkStdString.
30
31
class
vtkCallbackCommand
;
32
class
vtkCompositeDataSet
;
33
class
vtkXMLDataElement
;
34
class
vtkXMLCompositeDataWriterInternals;
35
36
class
VTK_IO_EXPORT
vtkXMLCompositeDataWriter
:
public
vtkXMLWriter
37
{
38
public
:
39
vtkTypeMacro(
vtkXMLCompositeDataWriter
,
vtkXMLWriter
);
40
void
PrintSelf
(ostream& os,
vtkIndent
indent);
41
43
virtual
const
char
*
GetDefaultFileExtension
();
44
49
vtkGetMacro(GhostLevel,
int
);
50
vtkSetMacro(GhostLevel,
int
);
52
54
55
vtkGetMacro(WriteMetaFile,
int
);
56
virtual
void
SetWriteMetaFile(
int
flag);
58
60
61
int
ProcessRequest
(
vtkInformation
*,
62
vtkInformationVector
**,
63
vtkInformationVector
*);
65
66
protected
:
67
vtkXMLCompositeDataWriter
();
68
~
vtkXMLCompositeDataWriter
();
69
71
74
virtual
int
GetDataSetMajorVersion
() {
return
1; }
75
virtual
int
GetDataSetMinorVersion
() {
return
0; }
77
79
vtkStdString
CreatePieceFileName(
int
Piece);
80
81
// see algorithm for more info
82
virtual
int
FillInputPortInformation
(
int
port
,
vtkInformation
*
info
);
83
84
int
RequestData
(
85
vtkInformation
* ,
vtkInformationVector
** ,
vtkInformationVector
*);
86
int
RequestUpdateExtent(
87
vtkInformation
* ,
vtkInformationVector
** ,
vtkInformationVector
*);
88
89
virtual
int
WriteData
();
90
virtual
const
char
*
GetDataSetName
();
91
92
// Create a default executive.
93
virtual
vtkExecutive
*
CreateDefaultExecutive
();
94
95
vtkInformation
*
InputInformation
;
96
98
virtual
void
FillDataTypes(
vtkCompositeDataSet
*);
99
101
unsigned
int
GetNumberOfDataTypes();
102
104
int
* GetDataTypesPointer();
105
106
// Methods to create the set of writers matching the set of inputs.
107
void
CreateWriters(
vtkCompositeDataSet
*);
108
vtkXMLWriter
* GetWriter(
int
index
);
109
110
// Methods to help construct internal file names.
111
void
SplitFileName();
112
const
char
* GetFilePrefix();
113
const
char
* GetFilePath();
114
118
int
WriteMetaFileIfRequested();
119
120
// Make a directory.
121
void
MakeDirectory(
const
char
*
name
);
122
123
// Remove a directory.
124
void
RemoveADirectory(
const
char
*
name
);
125
126
// Internal implementation details.
127
vtkXMLCompositeDataWriterInternals*
Internal
;
128
129
// The number of ghost levels to write for unstructured data.
130
int
GhostLevel
;
131
135
int
WriteMetaFile
;
136
137
// Callback registered with the ProgressObserver.
138
static
void
ProgressCallbackFunction(
vtkObject
*,
unsigned
long
,
void
*,
139
void
*);
140
// Progress callback from internal writer.
141
virtual
void
ProgressCallback(
vtkAlgorithm
* w);
142
143
// The observer to report progress from the internal writer.
144
vtkCallbackCommand
*
ProgressObserver
;
145
146
// Garbage collection support.
147
virtual
void
ReportReferences
(
vtkGarbageCollector
*);
148
150
156
virtual
int
WriteComposite(
vtkCompositeDataSet
* compositeData,
157
vtkXMLDataElement
* element,
int
&writerIdx)=0;
159
161
168
virtual
int
WriteNonCompositeData(
169
vtkDataObject
* dObj,
vtkXMLDataElement
* element,
170
int
& writerIdx,
const
char
* FileName);
172
175
virtual
void
RemoveWrittenFiles(
const
char
* SubDirectory);
176
177
private
:
178
vtkXMLCompositeDataWriter
(
const
vtkXMLCompositeDataWriter
&);
// Not implemented.
179
void
operator=(
const
vtkXMLCompositeDataWriter
&);
// Not implemented.
180
};
181
182
#endif
Generated on Thu Mar 13 2014 08:10:23 for VTK by
1.8.1.2