#
libsff

Home | Modules | Examples

# Core API

The Core API provides low-level access to the file. More...

## CCMIOBuffer

Buffers reading and writing.
void | CCMIOSetBufferSize (int n)
| Sets the buffer size (in elements) for new buffers.
CCMIOError | CCMIOCreateBuffer (CCMIOError *err, CCMIONode node, CCMIOBufferType which, CCMIOBuffer *buff)
| Creates a buffer.
CCMIOError | CCMIODestroyBuffer (CCMIOError *err, CCMIOBuffer buff)
| Destroys the buffer (even if an err is not kCCMIONoErr).
CCMIOError | CCMIOBufferReadDataPoint (CCMIOError *err, CCMIOBuffer buff, void *data,...)
| Reads one data point.
CCMIOError | CCMIOvBufferReadDataPoint (CCMIOError *err, CCMIOBuffer buff, void *data, va_list args)
| Sets the buffer size (in elements) for new buffers.
CCMIOError | CCMIOBufferWriteNextDataPoint (CCMIOError *err, CCMIOBuffer buff, int n, void *data)
| Reads one data point.
CCMIOError | CCMIOBufferWriteDataPoint (CCMIOError *err, CCMIOBuffer buff, void *data,...)
| Writes one data point to the buffer, which is written when the buffer is closed.
CCMIOError | CCMIOvBufferWriteDataPoint (CCMIOError *err, CCMIOBuffer buff, void *data, va_list args)
| Sets the buffer size (in elements) for new buffers.
CCMIOError | CCMIOBufferGetNode (CCMIOError *err, CCMIOBuffer buff, CCMIONode *node)
| Returns the node associated with the buffer.

## Core functions

The minimal set of functions.
CCMIOError | CCMIOOpen (const char *filename, CCMIOIOType mode, CCMIONode *root)
| Opens the data file.
CCMIOError | CCMIOClose (CCMIONode root)
| Closes the data file.
CCMIOError | CCMIOGetNode (CCMIOError *err, CCMIONode parent, const char *path, CCMIONode *node)
| Finds a node, given a node path.
CCMIOError | CCMIOGetNumberOfChildren (CCMIOError *err, CCMIONode parent, int *n)
| Returns the number of children in the parent node.
CCMIOError | CCMIOGetNextChild (CCMIOError *err, CCMIONode parent, int *n, CCMIONode *child)
| Returns the next child node.
CCMIOError | CCMIOGetName (CCMIOError *err, CCMIONode node, char *name)
| Returns the name of the node.
CCMIOError | CCMIOSetName (CCMIOError *err, CCMIONode node, const char *name)
| Sets the name of an existing node.
CCMIOError | CCMIOGetLabel (CCMIOError *err, CCMIONode node, char *label)
| Returns the label of the node.
CCMIOError | CCMIOSetLabel (CCMIOError *err, CCMIONode node, const char *label)
| Sets the label of an existing node.
CCMIOError | CCMIOCreateNode (CCMIOError *err, CCMIONode parent, int openDup, const char *name, const char *label, CCMIONode *node)
| Creates a new node.
CCMIOError | CCMIOCreateLink (CCMIOError *err, CCMIONode parent, const char *name, const char *filename, const char *destName, CCMIONode *node)
| Creates a new link.
CCMIOError | CCMIODeleteNode (CCMIOError *err, CCMIONode node)
| Deletes the node.
CCMIOError | CCMIODeleteAllChildren (CCMIOError *err, CCMIONode node)
| Deletes all children of the node, but not the node itself.
CCMIOError | CCMIOMoveNode (CCMIOError *err, CCMIONode node, CCMIONode newParent)
| Moves the node underneath newParent.
CCMIOError | CCMIOGetDimensions (CCMIOError *err, CCMIONode node, int *nDims, int **dims)
| Returns the number of items in the node's data.
CCMIOError | CCMIOGetDataSize (CCMIOError *err, CCMIONode node, unsigned int *bytes)
| Returns the number of bytes of the data.
CCMIOError | CCMIOGetDataType (CCMIOError *err, CCMIONode node, CCMIODataType *type)
| Returns the data type for the node.
CCMIOError | CCMIOSetDataType (CCMIOError *err, CCMIONode node, CCMIODataType type,...)
| Sets the datatype of the node.
CCMIOError | CCMIOvSetDataType (CCMIOError *err, CCMIONode node, CCMIODataType type, va_list args)
| Opens the data file.
CCMIOError | CCMIOSetDataTypev (CCMIOError *err, CCMIONode node, CCMIODataType type, int nDims, const int *dims)
| Opens the data file.
CCMIOError | CCMIOReadData (CCMIOError *err, CCMIONode node, void *data, CCMIODataType expected, int dimsExpected)
| Returns all the data in the node.
CCMIOError | CCMIOReadDataPoint (CCMIOError *err, CCMIONode node, void *data,...)
| Returns one element of data.
CCMIOError | CCMIOWriteDataPoint (CCMIOError *err, CCMIONode node, void *data,...)
| Write one element of data.
CCMIOError | CCMIOWriteData (CCMIOError *err, CCMIONode node, const void *data)
| Writes the entire node's data.
int | CCMIOAreNodesEqual (CCMIONode node1, CCMIONode node2)
| Returns TRUE if node1 == node2, FALSE otherwise.
CCMIOError | CCMIOGetRootNode (CCMIOError *err, CCMIONode node, CCMIONode *root)
| Returns the root node, or kCCMIOBadParameterErr if 'node' is not valid.

## Utility functions

Condenses common tasks
CCMIOError | CCMIOWriteNodei (CCMIOError *err, CCMIONode parent, const char *name, int value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWriteNodef (CCMIOError *err, CCMIONode parent, const char *name, float value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWriteNoded (CCMIOError *err, CCMIONode parent, const char *name, double value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWriteNodestr (CCMIOError *err, CCMIONode parent, const char *name, const char *value)
| Creates a child node of parent with given name and string value.
CCMIOError | CCMIOReadNodei (CCMIOError *err, CCMIONode parent, const char *name, int *value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOReadNodef (CCMIOError *err, CCMIONode parent, const char *name, float *value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOReadNoded (CCMIOError *err, CCMIONode parent, const char *name, double *value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOReadNodestr (CCMIOError *err, CCMIONode parent, const char *name, char **value)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead1i (CCMIOError *err, CCMIONode node, int *data, unsigned int start, unsigned int end)
| Reads the entire contents of the node into the array provided.
CCMIOError | CCMIORead1f (CCMIOError *err, CCMIONode node, float *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead1d (CCMIOError *err, CCMIONode node, double *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead2i (CCMIOError *err, CCMIONode node, int *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead2f (CCMIOError *err, CCMIONode node, float *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead2d (CCMIOError *err, CCMIONode node, double *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead3i (CCMIOError *err, CCMIONode node, int *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead3f (CCMIOError *err, CCMIONode node, float *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIORead3d (CCMIOError *err, CCMIONode node, double *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite1i (CCMIOError *err, CCMIONode node, int n, const int *data, unsigned int start, unsigned int end)
| Writes the entire array to the node.
CCMIOError | CCMIOWrite1f (CCMIOError *err, CCMIONode node, int n, const float *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite1d (CCMIOError *err, CCMIONode node, int n, const double *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite2i (CCMIOError *err, CCMIONode node, int x, int y, const int *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite2f (CCMIOError *err, CCMIONode node, int x, int y, const float *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite2d (CCMIOError *err, CCMIONode node, int x, int y, const double *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite3i (CCMIOError *err, CCMIONode node, int x, int y, int z, const int *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite3f (CCMIOError *err, CCMIONode node, int x, int y, int z, const float *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOWrite3d (CCMIOError *err, CCMIONode node, int x, int y, int z, const double *data, unsigned int start, unsigned int end)
| Creates a child node of parent with given name and value.
CCMIOError | CCMIOOldReadf (CCMIOError *err, CCMIONode node, int dimension, int swapDims, float *data, unsigned int start, unsigned int end)
CCMIOError | CCMIOOldReadd (CCMIOError *err, CCMIONode node, int dimension, int swapDims, double *data, unsigned int start, unsigned int end)
CCMIOError | CCMIOOldReadi (CCMIOError *err, CCMIONode node, int dimension, int swapDims, int *data, unsigned int start, unsigned int end)
CCMIOError | CCMIOCopyNode (CCMIOError *err, CCMIONode origNode, CCMIONode copyNode, int copyExists)
| Recursively copies a node.
CCMIOError | CCMIOGetNextChildWithLabel (CCMIOError *err, CCMIONode parent, const char *label, int *n, CCMIONode *child)
| Same as CCMIOGetNextChild() (particularly with respect to the parameter n) except that it only returns children with the specified label.
CCMIOError | CCMIOCompress (CCMIOError *err, char *filename)
| Compresses the CCMIO file specified.

## Detailed Description

The Core API provides low-level access to the file.

In general this API is not necessary as the Intermediate API provides a more useful interface.

## Function Documentation

int CCMIOAreNodesEqual | ( | CCMIONode | node1,
|  | CCMIONode | node2
| ) |

| Returns TRUE if node1 == node2, FALSE otherwise.

CCMIOError CCMIOBufferGetNode | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff,
|  | CCMIONode * | node
| ) |

| Returns the node associated with the buffer.

CCMIOError CCMIOBufferReadDataPoint | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff,
|  | void * | data,
|  |  | ...
| ) |

Reads one data point.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set the the function's return value on exit.
  buff | The buffer to use.
  ... | The number and size of the dimensions, terminated with a kCCMIOEndArgs. For instance an array of "int ary[5][10];" would be "CCMIOReadDataPoint(node, data, 5, 10, kCCMIOEndArgs)". A single dimension of size 1 is equivalent to a scalar value. If n is out of range returns kCCMIONoDataErr.

CCMIOError CCMIOBufferWriteDataPoint | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff,
|  | void * | data,
|  |  | ...
| ) |

| Writes one data point to the buffer, which is written when the buffer is closed. Note that the buffer must be opened as a write buffer.

CCMIOError CCMIOBufferWriteNextDataPoint | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff,
|  | int | n,
|  | void * | data
| ) |

Reads one data point.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set the the function's return value on exit.
  buff | The buffer to use.
  n | The offset of the data point as if the data were one contiguous array (even if in actuality the array is multi-dimensional). If n is out of range returns kCCMIONoDataErr.

CCMIOError CCMIOClose | ( | CCMIONode | root | ) |

Closes the data file.

Parameters:

  root | Root node of the file to be closed.

CCMIOError CCMIOCompress | ( | CCMIOError * | err,
|  | char * | filename
| ) |

Compresses the CCMIO file specified.

This is occasionally necessary becase ADF (the underlying storage format) leaks disk space; ADF does not completely recover the space when a node is delete or is rewritten with less information. The compression is performed by copying the data to a new ADF file, which is then renamed to the original name. This function will correctly compress CCMIO files, and will probably, but not necessarily, correctly compress ADF files. Also note that this function requires temporary storage equal to the size of the original file in the same filesystem as the original file and should not be called frequently, as it may take a some time.

Examples:
  writeexample.cpp.

CCMIOError CCMIOCopyNode | ( | CCMIOError * | err,
|  | CCMIONode | origNode,
|  | CCMIONode | copyNode,
|  | int | copyExists
| ) |

Recursively copies a node.

origNode and copyNode need not be from the same file.

Parameters:

  origNode | The node to be copied.
  copyNode | If copyExists is TRUE, then copyNode is the node to be copied over. Otherwise, it is the parent, and a copy of origNode will be created as a child.
  copyExists | Determines the function of copyNode.

CCMIOError CCMIOCreateBuffer | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIOBufferType | which,
|  | CCMIOBuffer * | buff
| ) |

| Creates a buffer.

CCMIOError CCMIOCreateLink | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | const char * | filename,
|  | const char * | destName,
|  | CCMIONode * | node
| ) |

Creates a new link.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  parent | The parent node of the new link.
  name | The name of the node. See CCMIOCreateNode() for more details on this parameter.
  filename | Filename that the link points to.
  destName | Path to the node to be linked to.
  node | Returns the new node (invalid in case of an error). NULL may be passed in if no return is required.

CCMIOError CCMIOCreateNode | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | int | openDup,
|  | const char * | name,
|  | const char * | label,
|  | CCMIONode * | node
| ) |

Creates a new node.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  parent | The parent node of the new node.
  openDup | If TRUE, a kCCMIODuplicateNodeErr will not be returned in an attempt to create a sibling with the same name; instead, CCMIOGetNode() will be called on the original node If FALSE, the error will be returned and the value of node is undefined.
  name | The name of the node. If the file type (e.g. ADF) limits lengths of names, the name will be truncated.
  label | The label of the name. This may be trunctated like the name.
  node | Returns the new node. NULL may be passed in if no return is required.

CCMIOError CCMIODeleteAllChildren | ( | CCMIOError * | err,
|  | CCMIONode | node
| ) |

| Deletes all children of the node, but not the node itself.

CCMIOError CCMIODeleteNode | ( | CCMIOError * | err,
|  | CCMIONode | node
| ) |

| Deletes the node.

CCMIOError CCMIODestroyBuffer | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff
| ) |

| Destroys the buffer (even if an err is not kCCMIONoErr).

CCMIOError CCMIOGetDataSize | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | unsigned int * | bytes
| ) |

| Returns the number of bytes of the data.

CCMIOError CCMIOGetDataType | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIODataType * | type
| ) |

| Returns the data type for the node.

CCMIOError CCMIOGetDimensions | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int * | nDims,
|  | int ** | dims
| ) |

Returns the number of items in the node's data.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node to use
  nDims | Returns the number of dimensions. 0 means no data.
  dims | Returns the number of elements of each dimension. Note that this array is allocated by the library and must be freed by the user.

CCMIOError CCMIOGetLabel | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | char * | label
| ) |

Returns the label of the node.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node whose label is to be returned.
  label | Returns the label of the node. This string must be at least kCCMIOMaxStringLength + 1 bytes.

CCMIOError CCMIOGetName | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | char * | name
| ) |

Returns the name of the node.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node whose name is to be returned.
  name | Returns the name of the node. Must be at least kCCMIOMaxStringLength + 1 bytes.

CCMIOError CCMIOGetNextChild | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | int * | n,
|  | CCMIONode * | child
| ) |

Returns the next child node.

Note that there is no guarantee that the order of the children will always be the same.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  parent | Parent node of the prospective children.
  n | Which child (i.e. return the nth child). n will be incremented upon successful completion of the function. If there is no nth child, a kCCMIONoNodeErr error will be returned.
  child | The nth child, or NULL if the nth child does not exist.

CCMIOError CCMIOGetNextChildWithLabel | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | label,
|  | int * | n,
|  | CCMIONode * | child
| ) |

| Same as CCMIOGetNextChild() (particularly with respect to the parameter n) except that it only returns children with the specified label.

CCMIOError CCMIOGetNode | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | path,
|  | CCMIONode * | node
| ) |

Finds a node, given a node path.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  parent | The node that the root of the path begins with (need not be the actual root node).
  path | A unix-like path containing the names of nodes. The beginning / is optional. (e.g. "/solver/brep/topology/endpoints").
  node | Returns the node (invalid if it does not exist).

CCMIOError CCMIOGetNumberOfChildren | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | int * | n
| ) |

| Returns the number of children in the parent node.

CCMIOError CCMIOGetRootNode | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIONode * | root
| ) |

| Returns the root node, or kCCMIOBadParameterErr if 'node' is not valid.

CCMIOError CCMIOMoveNode | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIONode | newParent
| ) |

| Moves the node underneath newParent.

CCMIOError CCMIOOldReadd | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | dimension,
|  | int | swapDims,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| For internal use only.

CCMIOError CCMIOOldReadf | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | dimension,
|  | int | swapDims,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| For internal use only.

CCMIOError CCMIOOldReadi | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | dimension,
|  | int | swapDims,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| For internal use only.

CCMIOError CCMIOOpen | ( | const char * | filename,
|  | CCMIOIOType | mode,
|  | CCMIONode * | root
| ) |

Opens the data file.

The file will be created if it does not already exist.

Parameters:

  filename | Name of the file to open.
  mode | Mode to open the file: kCCMIORead or kCCMIOWrite.
  root | Returns the root node of the file.

CCMIOError CCMIORead1d | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead1f | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead1i | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the entire contents of the node into the array provided.

The array must be the proper size (which can be determined with CCMIOGetDimensions()). If actual node data is stored in a different format than requested, it will be converted. For multidimensional arrays, the parameter isC specifies whether the data should be returned in Fortran or C order. Since data is stored in Fortran order on disk, returning C order involves an extra copy.

CCMIOError CCMIORead2d | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead2f | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead2i | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead3d | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead3f | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIORead3i | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOReadData | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | void * | data,
|  | CCMIODataType | expected,
|  | int | dimsExpected
| ) |

Returns all the data in the node.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node to use
  data | Pointer to memory large enough to hold the entire data; note that this is not allocated by the library. The data is returned as FORTRAN data.
  expected | The expected type. A kCCMIOWrongDataTypeErr error is returned if the node's data is not of the expected type and no data is written.
  dimsExpected | The number of dimensions that are expected. A kCCMIOWrongDataType error is returned if the node's data has a different number of dimensions. A scalar and a one-dimensional array both have dimensions of 1.

CCMIOError CCMIOReadDataPoint | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | void * | data,
|  |  | ...
| ) |

Returns one element of data.

No datatype checking is performed.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node whose data to return.
  data | Pointer to memory large enough to hold one element
  ... | Var-arg list that is the C-style index into the array. Scalar values can be read by using a single value of 0, although CCMIOReadData() is preferred. At least one parameter must be passed to the list. Note that the list must be terminated with kCCMIOEndArgs.

CCMIOError CCMIOReadNoded | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | double * | value
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOReadNodef | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | float * | value
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOReadNodei | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | int * | value
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOReadNodestr | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | char ** | value
| ) |

| Creates a child node of parent with given name and value.

void CCMIOSetBufferSize | ( | int | n | ) |

| Sets the buffer size (in elements) for new buffers. If n is kCCMIOInfinite, a buffer as big as the node's data will be allocated.

CCMIOError CCMIOSetDataType | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIODataType | type,
|  |  | ...
| ) |

Sets the datatype of the node.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node
  type | The datatype
  ... | The number and size of the dimensions, terminated with a kCCMIOEndArgs. For instance an array of "int ary[5][10];" would be "CCMIOReadDataPoint(node, data, 5, 10, kCCMIOEndArgs)". A single dimension of size 1 is equivalent to a scalar value.

CCMIOError CCMIOSetDataTypev | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIODataType | type,
|  | int | nDims,
|  | const int * | dims
| ) |

Opens the data file.

The file will be created if it does not already exist.

Parameters:

  filename | Name of the file to open.
  mode | Mode to open the file: kCCMIORead or kCCMIOWrite.
  root | Returns the root node of the file.

CCMIOError CCMIOSetLabel | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | const char * | label
| ) |

| Sets the label of an existing node.

CCMIOError CCMIOSetName | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | const char * | name
| ) |

Sets the name of an existing node.

Parameters:

  err | Error input and output. If the incoming error is not kCCMIONoErr, the function will do nothing. Is set to the function's return value on exit.
  node | The node whose name is to be set.
  name | The name of the node. If the file type (e.g. ADF) limits lengths of names, the name will be truncated.

CCMIOError CCMIOvBufferReadDataPoint | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff,
|  | void * | data,
|  | va_list | args
| ) |

| Sets the buffer size (in elements) for new buffers. If n is kCCMIOInfinite, a buffer as big as the node's data will be allocated.

CCMIOError CCMIOvBufferWriteDataPoint | ( | CCMIOError * | err,
|  | CCMIOBuffer | buff,
|  | void * | data,
|  | va_list | args
| ) |

| Sets the buffer size (in elements) for new buffers. If n is kCCMIOInfinite, a buffer as big as the node's data will be allocated.

CCMIOError CCMIOvSetDataType | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | CCMIODataType | type,
|  | va_list | args
| ) |

Opens the data file.

The file will be created if it does not already exist.

Parameters:

  filename | Name of the file to open.
  mode | Mode to open the file: kCCMIORead or kCCMIOWrite.
  root | Returns the root node of the file.

CCMIOError CCMIOWrite1d | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | n,
|  | const double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite1f | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | n,
|  | const float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite1i | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | n,
|  | const int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes the entire array to the node. The node's size and data type will be automatically set to the proper values. See CCMIORead*() for comments on the isC parameter.

CCMIOError CCMIOWrite2d | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | x,
|  | int | y,
|  | const double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite2f | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | x,
|  | int | y,
|  | const float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite2i | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | x,
|  | int | y,
|  | const int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite3d | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | x,
|  | int | y,
|  | int | z,
|  | const double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite3f | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | x,
|  | int | y,
|  | int | z,
|  | const float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWrite3i | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | int | x,
|  | int | y,
|  | int | z,
|  | const int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWriteData | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | const void * | data
| ) |

| Writes the entire node's data. Requires that the node's datatype and size were correctly set with CCMIOSetDataType().

CCMIOError CCMIOWriteDataPoint | ( | CCMIOError * | err,
|  | CCMIONode | node,
|  | void * | data,
|  |  | ...
| ) |

Write one element of data.

No datatype checking is performed. See CCMIOReadDataPoint() for a discussion of the parameters. The var-arg list must be terminated with kCCMIOEndArgs. Note: for performance reasons, the datatype of 'data' is unknown to the function, so CCMIOWriteDataPoint() cannot be used to write strings, as it does not know when 'data' is a string. For string data use CCMIOWriteData. Note: When writing scalar data with CCMIOWriteDataPoint(), a dimension of 0 should be used: "CCMIOWriteDataPoint(err, node, data, 0, kCCMIOEndArgs)", although CCMIOWriteData() is preferred.

CCMIOError CCMIOWriteNoded | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | double | value
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWriteNodef | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | float | value
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWriteNodei | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | int | value
| ) |

| Creates a child node of parent with given name and value.

CCMIOError CCMIOWriteNodestr | ( | CCMIOError * | err,
|  | CCMIONode | parent,
|  | const char * | name,
|  | const char * | value
| ) |

| Creates a child node of parent with given name and string value.