14#if defined(__cplusplus)
15#error "This should be included only by a .c file."
27#define VTK_XMLWRITERF_MAX 256
28VTK_ABI_NAMESPACE_BEGIN
37#if !defined(VTK_FORTRAN_NAME)
38#define VTK_FORTRAN_NAME(name, NAME) name##__
40#if !defined(VTK_FORTRAN_ARG_STRING_POINTER)
41#define VTK_FORTRAN_ARG_STRING_POINTER(name) const char* name##_ptr_arg
43#if !defined(VTK_FORTRAN_ARG_STRING_LENGTH)
44#define VTK_FORTRAN_ARG_STRING_LENGTH(name) , const long int name##_len_arg
46#if !defined(VTK_FORTRAN_REF_STRING_POINTER)
47#define VTK_FORTRAN_REF_STRING_POINTER(name) name##_ptr_arg
49#if !defined(VTK_FORTRAN_REF_STRING_LENGTH)
50#define VTK_FORTRAN_REF_STRING_LENGTH(name) ((int)name##_len_arg)
92 fprintf(stderr,
"vtkXMLWriterF_Delete called with invalid id %d.\n", *self);
102 const int* self,
const int* objType)
110 fprintf(stderr,
"vtkXMLWriterF_SetDataModeType called with invalid id %d.\n", *self);
116void VTK_FORTRAN_NAME(vtkxmlwriterf_setdataobjecttype, VTKXMLWRITERF_SETDATAOBJECTTYPE)(
117 const int* self,
const int* objType)
125 fprintf(stderr,
"vtkXMLWriterF_SetDataObjectType called with invalid id %d.\n", *self);
132 const int* self,
int extent[6])
140 fprintf(stderr,
"vtkXMLWriterF_SetExtent called with invalid id %d.\n", *self);
147 const int* self,
const int* dataType,
void*
data,
const vtkIdType* numPoints)
155 fprintf(stderr,
"vtkXMLWriterF_SetPoints called with invalid id %d.\n", *self);
162 const int* self,
double origin[3])
170 fprintf(stderr,
"vtkXMLWriterF_SetOrigin called with invalid id %d.\n", *self);
177 const int* self,
double spacing[3])
185 fprintf(stderr,
"vtkXMLWriterF_SetSpacing called with invalid id %d.\n", *self);
191void VTK_FORTRAN_NAME(vtkxmlwriterf_setcoordinates, VTKXMLWRITERF_SETCOORDINATES)(
const int* self,
192 const int* axis,
const int* dataType,
void*
data,
const vtkIdType* numCoordinates)
201 fprintf(stderr,
"vtkXMLWriterF_SetCoordinates called with invalid id %d.\n", *self);
207void VTK_FORTRAN_NAME(vtkxmlwriterf_setcellswithtype, VTKXMLWRITERF_SETCELLSWITHTYPE)(
218 fprintf(stderr,
"vtkXMLWriterF_SetCellsWithType called with invalid id %d.\n", *self);
224void VTK_FORTRAN_NAME(vtkxmlwriterf_setcellswithtypes, VTKXMLWRITERF_SETCELLSWITHTYPES)(
235 fprintf(stderr,
"vtkXMLWriterF_SetCellsWithTypes called with invalid id %d.\n", *self);
241void VTK_FORTRAN_NAME(vtkxmlwriterf_setpointdata, VTKXMLWRITERF_SETPOINTDATA)(
const int* self,
243 const int* numComponents,
252 char* name_buffer = malloc(name_length + 1);
255 char* role_buffer = malloc(role_length + 1);
256 if (!name_buffer || !role_buffer)
258 fprintf(stderr,
"vtkXMLWriterF_SetPointData failed to allocate name or role.\n");
269 memcpy(name_buffer, name_ptr, name_length);
270 name_buffer[name_length] = 0;
271 memcpy(role_buffer, role_ptr, role_length);
272 role_buffer[role_length] = 0;
276 *numComponents, role_buffer);
284 fprintf(stderr,
"vtkXMLWriterF_SetPointData called with invalid id %d.\n", *self);
290void VTK_FORTRAN_NAME(vtkxmlwriterf_setcelldata, VTKXMLWRITERF_SETCELLDATA)(
const int* self,
292 const int* numComponents,
301 char* name_buffer = malloc(name_length + 1);
304 char* role_buffer = malloc(role_length + 1);
305 if (!name_buffer || !role_buffer)
307 fprintf(stderr,
"vtkXMLWriterF_SetCellData failed to allocate name or role.\n");
318 memcpy(name_buffer, name_ptr, name_length);
319 name_buffer[name_length] = 0;
320 memcpy(role_buffer, role_ptr, role_length);
321 role_buffer[role_length] = 0;
325 *numComponents, role_buffer);
333 fprintf(stderr,
"vtkXMLWriterF_SetCellData called with invalid id %d.\n", *self);
347 char* name_buffer = malloc(name_length + 1);
350 fprintf(stderr,
"vtkXMLWriterF_SetFileName failed to allocate name.\n");
353 memcpy(name_buffer, name_ptr, name_length);
354 name_buffer[name_length] = 0;
364 fprintf(stderr,
"vtkXMLWriterF_SetFileName called with invalid id %d.\n", *self);
370void VTK_FORTRAN_NAME(vtkxmlwriterf_write, VTKXMLWRITERF_WRITE)(
const int* self,
int* success)
378 fprintf(stderr,
"vtkXMLWriterF_Write called with invalid id %d.\n", *self);
384void VTK_FORTRAN_NAME(vtkxmlwriterf_setnumberoftimesteps, VTKXMLWRITERF_SETNUMBEROFTIMESTEPS)(
385 const int* self,
const int* numTimeSteps)
393 fprintf(stderr,
"vtkXMLWriterF_SetNumberOfTimeSteps called with invalid id %d.\n", *self);
399void VTK_FORTRAN_NAME(vtkxmlwriterf_start, VTKXMLWRITERF_START)(
const int* self)
407 fprintf(stderr,
"vtkXMLWriterF_Start called with invalid id %d.\n", *self);
413void VTK_FORTRAN_NAME(vtkxmlwriterf_writenexttimestep, VTKXMLWRITERF_WRITENEXTTIMESTEP)(
414 const int* self,
const double* timeValue)
422 fprintf(stderr,
"vtkXMLWriterF_WriteNextTimeStep called with invalid id %d.\n", *self);
428void VTK_FORTRAN_NAME(vtkxmlwriterf_stop, VTKXMLWRITERF_STOP)(
const int* self)
436 fprintf(stderr,
"vtkXMLWriterF_Stop called with invalid id %d.\n", *self);
VTKIOXML_EXPORT void vtkXMLWriterC_SetDataModeType(vtkXMLWriterC *self, int datamodetype)
Set the VTK writer data mode to either:
VTKIOXML_EXPORT void vtkXMLWriterC_SetExtent(vtkXMLWriterC *self, int extent[6])
Set the extent of a structured data set.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCellsWithType(vtkXMLWriterC *self, int cellType, vtkIdType ncells, vtkIdType *cells, vtkIdType cellsSize)
Set a cell array on the data object to be written.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCellsWithTypes(vtkXMLWriterC *self, int *cellTypes, vtkIdType ncells, vtkIdType *cells, vtkIdType cellsSize)
Set a cell array on the data object to be written.
VTKIOXML_EXPORT void vtkXMLWriterC_SetOrigin(vtkXMLWriterC *self, double origin[3])
Set the origin of an image data set.
VTKIOXML_EXPORT void vtkXMLWriterC_Stop(vtkXMLWriterC *self)
Stop writing a time-series to the output file.
VTKIOXML_EXPORT void vtkXMLWriterC_SetDataObjectType(vtkXMLWriterC *self, int objType)
Set the VTK data object type that will be written.
VTKIOXML_EXPORT void vtkXMLWriterC_Start(vtkXMLWriterC *self)
Start writing a time-series to the output file.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCoordinates(vtkXMLWriterC *self, int axis, int dataType, void *data, vtkIdType numCoordinates)
Set the coordinates along one axis of a rectilinear grid data set.
VTKIOXML_EXPORT void vtkXMLWriterC_SetNumberOfTimeSteps(vtkXMLWriterC *self, int numTimeSteps)
Set the number of time steps that will be written between upcoming Start and Stop calls.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCellData(vtkXMLWriterC *self, const char *name, int dataType, void *data, vtkIdType numTuples, int numComponents, const char *role)
VTKIOXML_EXPORT int vtkXMLWriterC_Write(vtkXMLWriterC *self)
Write the data to a file immediately.
VTKIOXML_EXPORT void vtkXMLWriterC_SetSpacing(vtkXMLWriterC *self, double spacing[3])
Set the spacing of an image data set.
VTKIOXML_EXPORT void vtkXMLWriterC_SetFileName(vtkXMLWriterC *self, const char *fileName)
Set the name of the file into which the data are to be written.
VTKIOXML_EXPORT void vtkXMLWriterC_SetPointData(vtkXMLWriterC *self, const char *name, int dataType, void *data, vtkIdType numTuples, int numComponents, const char *role)
Set a point or cell data array by name.
struct vtkXMLWriterC_s vtkXMLWriterC
vtkXMLWriterC is an opaque structure holding the state of an individual writer object.
VTKIOXML_EXPORT void vtkXMLWriterC_SetPoints(vtkXMLWriterC *self, int dataType, void *data, vtkIdType numPoints)
Set the points of a point data set.
VTKIOXML_EXPORT void vtkXMLWriterC_WriteNextTimeStep(vtkXMLWriterC *self, double timeValue)
Write one time step of a time-series to the output file.
VTKIOXML_EXPORT void vtkXMLWriterC_Delete(vtkXMLWriterC *self)
Delete the writer object.
VTKIOXML_EXPORT vtkXMLWriterC * vtkXMLWriterC_New()
Create a new instance of vtkXMLWriterC.
#define VTK_XMLWRITERF_MAX
static vtkXMLWriterC * vtkXMLWriterF_Table[VTK_XMLWRITERF_MAX+1]
#define VTK_FORTRAN_REF_STRING_POINTER(name)
#define VTK_FORTRAN_ARG_STRING_POINTER(name)
#define VTK_FORTRAN_REF_STRING_LENGTH(name)
#define VTK_FORTRAN_NAME(name, NAME)
#define VTK_FORTRAN_ARG_STRING_LENGTH(name)