21 #ifndef vtkXMLWriter_h
22 #define vtkXMLWriter_h
24 #include "vtkIOXMLModule.h"
29 VTK_ABI_NAMESPACE_BEGIN
79 vtkGetMacro(NumberOfTimeSteps,
int);
80 vtkSetMacro(NumberOfTimeSteps,
int);
89 void WriteNextTime(
double time);
113 #if VTK_SIZEOF_SHORT == 4
114 typedef short Int32IdType;
115 #elif VTK_SIZEOF_INT == 4
116 typedef int Int32IdType;
117 #elif VTK_SIZEOF_LONG == 4
118 typedef long Int32IdType;
120 #error "No native data type can represent a signed 32-bit integer."
143 virtual int WriteInternal();
150 virtual const char* GetDataSetName() = 0;
154 virtual int StartFile();
155 virtual void WriteFileAttributes();
156 virtual int EndFile();
158 void DeleteAFile(
const char*
name);
160 virtual int WritePrimaryElement(ostream& os,
vtkIndent indent);
161 virtual void WritePrimaryElementAttributes(ostream& os,
vtkIndent indent);
162 void StartAppendedData();
163 void EndAppendedData();
172 vtkTypeInt64 ReserveAttributeSpace(
const char* attr,
size_t length = 20);
174 vtkTypeInt64 GetAppendedDataOffset();
175 void WriteAppendedDataOffset(
176 vtkTypeInt64 streamPos, vtkTypeInt64& lastoffset,
const char* attr =
nullptr);
177 void ForwardAppendedDataOffset(
178 vtkTypeInt64 streamPos, vtkTypeInt64
offset,
const char* attr =
nullptr);
179 void ForwardAppendedDataDouble(vtkTypeInt64 streamPos,
double value,
const char* attr);
181 int WriteScalarAttribute(
const char*
name,
int data);
182 int WriteScalarAttribute(
const char*
name,
float data);
183 int WriteScalarAttribute(
const char*
name,
double data);
184 #ifdef VTK_USE_64BIT_IDS
188 int WriteVectorAttribute(
const char*
name,
int length,
int*
data);
189 int WriteVectorAttribute(
const char*
name,
int length,
float*
data);
190 int WriteVectorAttribute(
const char*
name,
int length,
double*
data);
191 #ifdef VTK_USE_64BIT_IDS
195 int WriteDataModeAttribute(
const char*
name);
196 int WriteWordTypeAttribute(
const char*
name,
int dataType);
197 int WriteStringAttribute(
const char*
name,
const char*
value);
203 int writeNumTuples,
int timestep);
204 virtual void WriteArrayFooter(
207 const char* alternateName =
nullptr,
int writeNumTuples = 0);
211 const char* alternateName =
nullptr,
int writeNumTuples = 0,
int timestep = 0);
215 void WriteArrayAppendedData(
vtkAbstractArray* a, vtkTypeInt64 pos, vtkTypeInt64& lastoffset);
232 void WriteCoordinatesInline(
245 int WriteBinaryDataBlock(
unsigned char* in_data,
size_t numWords,
int wordType);
246 void PerformByteSwap(
void*
data,
size_t numWords,
size_t wordSize);
247 int CreateCompressionHeader(
size_t size);
248 int WriteCompressionBlock(
unsigned char*
data,
size_t size);
249 int WriteCompressionHeader();
250 size_t GetWordTypeSize(
int dataType);
251 const char* GetWordTypeName(
int dataType);
252 size_t GetOutputWordTypeSize(
int dataType);
254 char** CreateStringArray(
int numStrings);
255 void DestroyStringArray(
int numStrings,
char** strings);
259 virtual void GetProgressRange(
float range[2]);
260 virtual void SetProgressRange(
const float range[2],
int curStep,
int numSteps);
261 virtual void SetProgressRange(
const float range[2],
int curStep,
const float* fractions);
262 virtual void SetProgressPartial(
float fraction);
263 virtual void UpdateProgressDiscrete(
float progress);
264 float ProgressRange[2];
290 friend class vtkXMLWriterHelper;
297 VTK_ABI_NAMESPACE_END
vtkTypeInt64 * NumberOfTimeValues
Wrapper around std::string to keep symbols short.
Abstract interface for data compression classes.
represent and manipulate point attribute data
vtkDataObject * GetInput()
Assign a data object as input.
abstract class to specify dataset behavior
Abstract superclass for all arrays.
represent and manipulate cell attribute data
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Helper class due to PIMPL excess.
Implementation template for a array iterator.
vtkOutputStream * DataStream
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkTypeInt64 AppendedDataPosition
Superclass for VTK's XML file writers.
a simple class to control print indentation
Abstract base class for VTK-XML writers.
abstract superclass for arrays of numeric data
std::ostringstream * OutStringStream
size_t CompressionBlockNumber
Abstract superclass to iterate over elements in an vtkAbstractArray.
represent and manipulate attribute data in a dataset
vtkTypeInt64 CompressionHeaderPosition
Wraps a binary output stream with a VTK interface.
unsigned char * ByteSwapBuffer
general representation of visualization data
represent and manipulate 3D points
vtkXMLDataHeader * CompressionHeader
int UserContinueExecuting
OffsetsManagerGroup * FieldDataOM
represent and manipulate fields of data
Int32IdType * Int32IdTypeBuffer