|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   15 #ifndef vtkXMLWriterF_h 
   16 #define vtkXMLWriterF_h 
   26 #if defined(__cplusplus) 
   27 #error "This should be included only by a .c file." 
   39 #define VTK_XMLWRITERF_MAX 256 
   48 #if !defined(VTK_FORTRAN_NAME) 
   49 #define VTK_FORTRAN_NAME(name, NAME) name##__ 
   51 #if !defined(VTK_FORTRAN_ARG_STRING_POINTER) 
   52 #define VTK_FORTRAN_ARG_STRING_POINTER(name) const char* name##_ptr_arg 
   54 #if !defined(VTK_FORTRAN_ARG_STRING_LENGTH) 
   55 #define VTK_FORTRAN_ARG_STRING_LENGTH(name) , const long int name##_len_arg 
   57 #if !defined(VTK_FORTRAN_REF_STRING_POINTER) 
   58 #define VTK_FORTRAN_REF_STRING_POINTER(name) name##_ptr_arg 
   60 #if !defined(VTK_FORTRAN_REF_STRING_LENGTH) 
   61 #define VTK_FORTRAN_REF_STRING_LENGTH(name) ((int)name##_len_arg) 
  103     fprintf(stderr, 
"vtkXMLWriterF_Delete called with invalid id %d.\n", *
self);
 
  112 void VTK_FORTRAN_NAME(vtkxmlwriterf_setdatamodetype, VTKXMLWRITERF_SETDATAMODETYPE)(
 
  113   const int* 
self, 
const int* objType)
 
  121     fprintf(stderr, 
"vtkXMLWriterF_SetDataModeType called with invalid id %d.\n", *
self);
 
  127 void VTK_FORTRAN_NAME(vtkxmlwriterf_setdataobjecttype, VTKXMLWRITERF_SETDATAOBJECTTYPE)(
 
  128   const int* 
self, 
const int* objType)
 
  136     fprintf(stderr, 
"vtkXMLWriterF_SetDataObjectType called with invalid id %d.\n", *
self);
 
  143   const int* 
self, 
int extent[6])
 
  151     fprintf(stderr, 
"vtkXMLWriterF_SetExtent called with invalid id %d.\n", *
self);
 
  158   const int* 
self, 
const int* dataType, 
void* 
data, 
const vtkIdType* numPoints)
 
  166     fprintf(stderr, 
"vtkXMLWriterF_SetPoints called with invalid id %d.\n", *
self);
 
  173   const int* 
self, 
double origin[3])
 
  181     fprintf(stderr, 
"vtkXMLWriterF_SetOrigin called with invalid id %d.\n", *
self);
 
  188   const int* 
self, 
double spacing[3])
 
  196     fprintf(stderr, 
"vtkXMLWriterF_SetSpacing called with invalid id %d.\n", *
self);
 
  202 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcoordinates, VTKXMLWRITERF_SETCOORDINATES)(
const int* 
self,
 
  203   const int* axis, 
const int* dataType, 
void* 
data, 
const vtkIdType* numCoordinates)
 
  212     fprintf(stderr, 
"vtkXMLWriterF_SetCoordinates called with invalid id %d.\n", *
self);
 
  218 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcellswithtype, VTKXMLWRITERF_SETCELLSWITHTYPE)(
 
  229     fprintf(stderr, 
"vtkXMLWriterF_SetCellsWithType called with invalid id %d.\n", *
self);
 
  235 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcellswithtypes, VTKXMLWRITERF_SETCELLSWITHTYPES)(
 
  246     fprintf(stderr, 
"vtkXMLWriterF_SetCellsWithTypes called with invalid id %d.\n", *
self);
 
  252 void VTK_FORTRAN_NAME(vtkxmlwriterf_setpointdata, VTKXMLWRITERF_SETPOINTDATA)(
const int* 
self,
 
  254   const int* numComponents,
 
  263     char* name_buffer = malloc(name_length + 1);
 
  266     char* role_buffer = malloc(role_length + 1);
 
  267     if (!name_buffer || !role_buffer)
 
  269       fprintf(stderr, 
"vtkXMLWriterF_SetPointData failed to allocate name or role.\n");
 
  280     memcpy(name_buffer, name_ptr, name_length);
 
  281     name_buffer[name_length] = 0;
 
  282     memcpy(role_buffer, role_ptr, role_length);
 
  283     role_buffer[role_length] = 0;
 
  287       *numComponents, role_buffer);
 
  295     fprintf(stderr, 
"vtkXMLWriterF_SetPointData called with invalid id %d.\n", *
self);
 
  301 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcelldata, VTKXMLWRITERF_SETCELLDATA)(
const int* 
self,
 
  303   const int* numComponents,
 
  312     char* name_buffer = malloc(name_length + 1);
 
  315     char* role_buffer = malloc(role_length + 1);
 
  316     if (!name_buffer || !role_buffer)
 
  318       fprintf(stderr, 
"vtkXMLWriterF_SetCellData failed to allocate name or role.\n");
 
  329     memcpy(name_buffer, name_ptr, name_length);
 
  330     name_buffer[name_length] = 0;
 
  331     memcpy(role_buffer, role_ptr, role_length);
 
  332     role_buffer[role_length] = 0;
 
  336       *numComponents, role_buffer);
 
  344     fprintf(stderr, 
"vtkXMLWriterF_SetCellData called with invalid id %d.\n", *
self);
 
  350 void VTK_FORTRAN_NAME(vtkxmlwriterf_setfilename, VTKXMLWRITERF_SETFILENAME)(
 
  358     char* name_buffer = malloc(name_length + 1);
 
  361       fprintf(stderr, 
"vtkXMLWriterF_SetFileName failed to allocate name.\n");
 
  364     memcpy(name_buffer, name_ptr, name_length);
 
  365     name_buffer[name_length] = 0;
 
  375     fprintf(stderr, 
"vtkXMLWriterF_SetFileName called with invalid id %d.\n", *
self);
 
  381 void VTK_FORTRAN_NAME(vtkxmlwriterf_write, VTKXMLWRITERF_WRITE)(
const int* 
self, 
int* success)
 
  389     fprintf(stderr, 
"vtkXMLWriterF_Write called with invalid id %d.\n", *
self);
 
  395 void VTK_FORTRAN_NAME(vtkxmlwriterf_setnumberoftimesteps, VTKXMLWRITERF_SETNUMBEROFTIMESTEPS)(
 
  396   const int* 
self, 
const int* numTimeSteps)
 
  404     fprintf(stderr, 
"vtkXMLWriterF_SetNumberOfTimeSteps called with invalid id %d.\n", *
self);
 
  410 void VTK_FORTRAN_NAME(vtkxmlwriterf_start, VTKXMLWRITERF_START)(
const int* 
self)
 
  418     fprintf(stderr, 
"vtkXMLWriterF_Start called with invalid id %d.\n", *
self);
 
  424 void VTK_FORTRAN_NAME(vtkxmlwriterf_writenexttimestep, VTKXMLWRITERF_WRITENEXTTIMESTEP)(
 
  425   const int* 
self, 
const double* timeValue)
 
  433     fprintf(stderr, 
"vtkXMLWriterF_WriteNextTimeStep called with invalid id %d.\n", *
self);
 
  439 void VTK_FORTRAN_NAME(vtkxmlwriterf_stop, VTKXMLWRITERF_STOP)(
const int* 
self)
 
  447     fprintf(stderr, 
"vtkXMLWriterF_Stop called with invalid id %d.\n", *
self);
 
  
#define VTK_FORTRAN_NAME(name, NAME)
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_SetCellData(vtkXMLWriterC *self, const char *name, int dataType, void *data, vtkIdType numTuples, int numComponents, const char *role)
VTKIOXML_EXPORT void vtkXMLWriterC_Delete(vtkXMLWriterC *self)
Delete the 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_SetNumberOfTimeSteps(vtkXMLWriterC *self, int numTimeSteps)
Set the number of time steps that will be written between upcoming Start and Stop calls.
#define VTK_FORTRAN_REF_STRING_LENGTH(name)
struct vtkXMLWriterC_s vtkXMLWriterC
vtkXMLWriterC is an opaque structure holding the state of an individual writer object.
#define VTK_FORTRAN_ARG_STRING_LENGTH(name)
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_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_SetSpacing(vtkXMLWriterC *self, double spacing[3])
Set the spacing of an image data set.
VTKIOXML_EXPORT void vtkXMLWriterC_Start(vtkXMLWriterC *self)
Start writing a time-series to the output file.
VTKIOXML_EXPORT vtkXMLWriterC * vtkXMLWriterC_New(void)
Create a new instance of vtkXMLWriterC.
#define VTK_XMLWRITERF_MAX
VTKIOXML_EXPORT void vtkXMLWriterC_SetOrigin(vtkXMLWriterC *self, double origin[3])
Set the origin of an image 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_SetDataModeType(vtkXMLWriterC *self, int datamodetype)
Set the VTK writer data mode to either:
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_SetCoordinates(vtkXMLWriterC *self, int axis, int dataType, void *data, vtkIdType numCoordinates)
Set the coordinates along one axis of a rectilinear grid data set.
static vtkXMLWriterC * vtkXMLWriterF_Table[VTK_XMLWRITERF_MAX+1]
VTKIOXML_EXPORT int vtkXMLWriterC_Write(vtkXMLWriterC *self)
Write the data to a file immediately.
#define VTK_FORTRAN_REF_STRING_POINTER(name)
VTKIOXML_EXPORT void vtkXMLWriterC_SetExtent(vtkXMLWriterC *self, int extent[6])
Set the extent of a structured data set.
#define VTK_FORTRAN_ARG_STRING_POINTER(name)
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.