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);
102 vtkSetClampMacro(Precision,
int, 0, 17);
103 vtkGetMacro(Precision,
int);
127 #if VTK_SIZEOF_SHORT == 4
128 typedef short Int32IdType;
129 #elif VTK_SIZEOF_INT == 4
130 typedef int Int32IdType;
131 #elif VTK_SIZEOF_LONG == 4
132 typedef long Int32IdType;
134 #error "No native data type can represent a signed 32-bit integer."
157 virtual int WriteInternal();
164 virtual const char* GetDataSetName() = 0;
168 virtual int StartFile();
169 virtual void WriteFileAttributes();
170 virtual int EndFile();
172 void DeleteAFile(
const char*
name);
174 virtual int WritePrimaryElement(ostream& os,
vtkIndent indent);
175 virtual void WritePrimaryElementAttributes(ostream& os,
vtkIndent indent);
176 void StartAppendedData();
177 void EndAppendedData();
186 vtkTypeInt64 ReserveAttributeSpace(
const char* attr,
size_t length = 20);
188 vtkTypeInt64 GetAppendedDataOffset();
189 void WriteAppendedDataOffset(
190 vtkTypeInt64 streamPos, vtkTypeInt64& lastoffset,
const char* attr =
nullptr);
191 void ForwardAppendedDataOffset(
192 vtkTypeInt64 streamPos, vtkTypeInt64
offset,
const char* attr =
nullptr);
193 void ForwardAppendedDataDouble(vtkTypeInt64 streamPos,
double value,
const char* attr);
195 int WriteScalarAttribute(
const char*
name,
int data);
196 int WriteScalarAttribute(
const char*
name,
float data);
197 int WriteScalarAttribute(
const char*
name,
double data);
198 #ifdef VTK_USE_64BIT_IDS
202 int WriteVectorAttribute(
const char*
name,
int length, VTK_FUTURE_CONST
int*
data);
203 int WriteVectorAttribute(
const char*
name,
int length, VTK_FUTURE_CONST
float*
data);
204 int WriteVectorAttribute(
const char*
name,
int length, VTK_FUTURE_CONST
double*
data);
205 #ifdef VTK_USE_64BIT_IDS
209 int WriteDataModeAttribute(
const char*
name);
210 int WriteWordTypeAttribute(
const char*
name,
int dataType);
211 int WriteStringAttribute(
const char*
name,
const char*
value);
217 int writeNumTuples,
int timestep);
218 virtual void WriteArrayFooter(
221 const char* alternateName =
nullptr,
int writeNumTuples = 0);
225 const char* alternateName =
nullptr,
int writeNumTuples = 0,
int timestep = 0);
229 void WriteArrayAppendedData(
vtkAbstractArray* a, vtkTypeInt64 pos, vtkTypeInt64& lastoffset);
246 void WriteCoordinatesInline(
259 int WriteBinaryDataBlock(
unsigned char* in_data,
size_t numWords,
int wordType);
260 void PerformByteSwap(
void*
data,
size_t numWords,
size_t wordSize);
261 int CreateCompressionHeader(
size_t size);
262 int WriteCompressionBlock(
unsigned char*
data,
size_t size);
263 int WriteCompressionHeader();
264 size_t GetWordTypeSize(
int dataType);
265 const char* GetWordTypeName(
int dataType);
266 size_t GetOutputWordTypeSize(
int dataType);
268 char** CreateStringArray(
int numStrings);
269 void DestroyStringArray(
int numStrings,
char** strings);
273 virtual void GetProgressRange(
float range[2]);
274 virtual void SetProgressRange(
const float range[2],
int curStep,
int numSteps);
275 virtual void SetProgressRange(
const float range[2],
int curStep,
const float* fractions);
276 virtual void SetProgressPartial(
float fraction);
277 virtual void UpdateProgressDiscrete(
float progress);
278 float ProgressRange[2];
305 friend class vtkXMLWriterHelper;
312 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
Represents and manipulates a collection of data arrays.
Int32IdType * Int32IdTypeBuffer