OC Updated for version 2.0
|
Functions | |
OCerror | oc_dds_properties (OCobject link, OCobject ddsnode, char **namep, OCtype *octypep, OCtype *atomtypep, OCobject *containerp, size_t *rankp, size_t *nsubnodesp, size_t *nattrp) |
OCerror | oc_dds_name (OCobject link, OCobject ddsnode, char **namep) |
OCerror | oc_dds_nsubnodes (OCobject link, OCobject ddsnode, size_t *nsubnodesp) |
OCerror | oc_dds_atomictype (OCobject link, OCobject ddsnode, OCtype *typep) |
OCerror | oc_dds_class (OCobject link, OCobject ddsnode, OCtype *typep) |
OCerror | oc_dds_rank (OCobject link, OCobject ddsnode, size_t *rankp) |
OCerror | oc_dds_attr_count (OCobject link, OCobject ddsnode, size_t *nattrp) |
OCerror | oc_dds_root (OCobject link, OCobject ddsnode, OCobject *rootp) |
OCerror | oc_dds_container (OCobject link, OCobject ddsnode, OCobject *containerp) |
OCerror | oc_dds_ithfield (OCobject link, OCobject ddsnode, size_t index, OCobject *fieldnodep) |
OCerror | oc_dds_gridarray (OCobject link, OCobject grid, OCobject *arraynodep) |
OCerror | oc_dds_gridmap (OCobject link, OCobject grid, size_t index, OCobject *mapnodep) |
OCerror | oc_dds_dimensions (OCobject link, OCobject ddsnode, OCobject *dims) |
OCerror | oc_dds_ithdimension (OCobject link, OCobject ddsnode, size_t index, OCobject *dimidp) |
OCerror | oc_dimension_properties (OCobject link, OCobject ddsnode, size_t *sizep, char **namep) |
OCerror | oc_dds_dimensionsizes (OCobject link, OCobject ddsnode, size_t *dimsizes) |
OCerror | oc_dds_attr (OCobject link, OCobject ddsnode, size_t index, char **namep, OCtype *octypep, size_t *nvaluesp, char **strings) |
void | oc_reclaim_strings (size_t n, char **svec) |
OCerror | oc_das_attr_count (OCobject link, OCobject dasnode, size_t *nvaluesp) |
OCerror | oc_das_attr (OCobject link, OCobject dasnode, size_t index, OCtype *etypep, char **valuep) |
OCerror oc_das_attr | ( | OCobject | link, |
OCobject | dasnode, | ||
size_t | index, | ||
OCtype * | etypep, | ||
char ** | valuep | ||
) |
The procedure oc_das_attr returns the i'th string value associated with a DAS object of type OC_Attribute. Note carefully that this operation applies to DAS nodes and not to DDS or DATADDS nodes. Note also that the returned value is always a string and it is the caller;'s responsibility to free the returned string.
[in] | link | The link through which the server is accessed. |
[in] | dasnode | The DAS node of interest. |
[in] | index | The index of the das value to return. |
[in] | etypep | A pointer into which is stored the atomic type of the attribute. |
[out] | valuep | A vector into which the attribute's string values are stored. Caller must allocate and free. |
OC_NOERR | The procedure executed normally. |
OC_EBADTPE | If the node is not of type OC_Attribute. |
OC_EINDEX | If the index is larger than the number of attributes. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 750 of file oc.c.
References OC_Attribute, OC_EBADTYPE, OC_EINDEX, OC_NOERR, OCDEREF, and OCVERIFY.
Return the count of DAS attribute values.
[in] | link | The link through which the server is accessed. |
[in] | dasnode | The node of interest |
[out] | nvaluesp | A pointer into which the number of attributes is stored. |
OC_NOERR | The procedure executed normally. |
OC_EBADTPE | If the node is not of type OC_Attribute. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 717 of file oc.c.
References OC_Attribute, OC_EBADTYPE, OC_NOERR, OCDEREF, and OCVERIFY.
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | typep | A pointer into which the atomictype is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
OCerror oc_dds_attr | ( | OCobject | link, |
OCobject | ddsnode, | ||
size_t | index, | ||
char ** | namep, | ||
OCtype * | octypep, | ||
size_t * | nvaluesp, | ||
char ** | strings | ||
) |
Return the name, type, length, and values associated with the i'th attribute of a specified node. The actual attribute strings are returned and the user must do any required conversion based on the octype. The strings argument must be allocated and freed by caller. Standard practice is to call twice, once with the strings argument == NULL so we get the number of values, then the second time with an allocated char** vector. The caller should reclaim the contents of the returned string vector using oc_reclaim_strings.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node of interest |
[in] | index | Return the information of the index'th attribute. |
[out] | namep | A pointer into which the attribute's name is stored. It must be freed by the caller. |
[out] | octypep | A pointer into which the attribute's atomic type is stored. |
[out] | nvaluesp | A pointer into which the number of attribute values is stored. |
[out] | strings | A vector into which the values of the attribute are stored. It must be allocated and free'd by the caller. |
OC_NOERR | The procedure executed normally. |
OC_EINDEX | If the index is more than the number of attributes. |
OtherError | One of the arguments (link, etc.) was invalid. |
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | nattrp | A pointer into which the number of attributes is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 381 of file oc.c.
References OC_Attribute, OC_NOERR, OCDEREF, and OCVERIFY.
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | typep | A pointer into which the octype is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | containerp | A pointer into which the the immediate container ddsnode is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Obtain the dimension nodes (of octype OC_Dimension) associated with the node of interest.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The dds node of interest. |
[out] | dims | A vector into which the dimension nodes are stored. The caller must allocate based on the rank of the node. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 527 of file oc.c.
References OC_ESCALAR, OC_NOERR, OCDEREF, and OCVERIFY.
Obtain just the set of sizes of the dimensions associated with a dds node.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node of interest |
[out] | dimsizes | A vector into which the sizes of all the dimensions of a node are stored. Its size is determined by the rank of the node and must be allocated and free'd by the caller. |
OC_NOERR | The procedure executed normally. |
OC_ESCALAR | If the node is a scalar. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 618 of file oc.c.
References OC_ESCALAR, OC_NOERR, OCDEREF, and OCVERIFY.
Obtain the DDS node corresponding to the array of a Grid container. Equivalent to oc_dds_ithfield(link,grid-container,0,arraynode).
[in] | link | The link through which the server is accessed. |
[in] | grid | The grid container node of interest. |
[out] | arraynodep | A pointer into which the grid array node is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 487 of file oc.c.
References oc_dds_ithfield().
Obtain the DDS node corresponding to the i'th map of a Grid container. Equivalent to oc_dds_ithfield(link,grid-container,index+1,arraynode). Note the map index starts at zero.
[in] | link | The link through which the server is accessed. |
[in] | grid | The grid container node of interest. |
[in] | index | The (zero-based) index of the map node to return. |
[out] | mapnodep | A pointer into which the grid map node is stored. |
OC_NOERR | The procedure executed normally. |
OC_EINDEX | The map index is illegal. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 508 of file oc.c.
References oc_dds_ithfield().
Obtain the i'th dimension node (of octype OC_Dimension) associated with the node of interest.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The dds node of interest. |
[in] | index | The index of the dimension to be returned. |
[out] | dimidp | A pointer into which the index'th dimension is stored. |
OC_NOERR | The procedure executed normally. |
OC_EINDEX | The index is greater than the node's rank. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 560 of file oc.c.
References OC_EINDEX, OC_ESCALAR, OC_NOERR, OCDEREF, and OCVERIFY.
Obtain the DDS node corresponding to the i'th field of a node that itself is a container (Dataset, Structure, Sequence, or Grid)
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The container node of interest. |
[in] | index | The index (starting at zero) of the field to return. |
[out] | fieldnodep | A pointer into which the i'th field node is stored. |
OC_NOERR | The procedure executed normally. |
OC_EINDEX | The index was greater than the number of fields. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 456 of file oc.c.
References OC_EBADTYPE, OC_EINDEX, OC_NOERR, OCDEREF, and OCVERIFY.
Referenced by oc_dds_gridarray(), and oc_dds_gridmap().
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | namep | A pointer into which the node name is stored as a null terminated string. The caller must free this value when no longer needed. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | nsubnodesp | A pointer into which the number of subnodes is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
OCerror oc_dds_properties | ( | OCobject | link, |
OCobject | ddsnode, | ||
char ** | namep, | ||
OCtype * | octypep, | ||
OCtype * | atomtypep, | ||
OCobject * | containerp, | ||
size_t * | rankp, | ||
size_t * | nsubnodesp, | ||
size_t * | nattrp | ||
) |
This procedure returns a variety of properties associated with a specific node. Any of the pointers may be NULL in the following procedure call; If the node is of type Dataset, then return # of global attributes If the node is of type Attribute, then return the # of values in nattrp.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | namep | Pointer for storing the node's associated name. The caller must free the returned name. |
[out] | octypep | Pointer for storing the node's octype. |
[out] | atomtypep | Pointer for storing the object's atomic type (i.e. OC_NAT .. OC_URL);only defined when the object's octype is OC_Atomic |
[out] | containerp | Pointer for storing the OCnode for which this object is a subnode. The value OCNULL is stored if the object is a root object. |
[out] | rankp | Pointer for storing the rank (i.e. the number of dimensions) for this object; zero implies a scalar. |
[out] | nsubnodesp | Pointer for storing the number of subnodes of this object. |
[out] | nattrp | Pointer for storing the number of attributes associated with this object. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 228 of file oc.c.
References OC_Attribute, OC_NOERR, OCDEREF, and OCVERIFY.
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | rankp | A pointer into which the rank is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Specialized accessor function as an alternative to oc_dds_properties.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The node whose properties are of interest. |
[out] | rootp | A pointer into which the the root of the tree containing the node is stored. |
OC_NOERR | The procedure executed normally. |
OtherError | One of the arguments (link, etc.) was invalid. |
Obtain the properties of a dimension node.
[in] | link | The link through which the server is accessed. |
[in] | ddsnode | The dimension node. |
[out] | sizep | A pointer into which to store the size of the dimension. |
[out] | namep | A pointer into which to store the name of the dimension. If the dimension is anonymous, then the value NULL is returned as the name. The caller must free the returned name. |
OC_NOERR | The procedure executed normally. |
OC_BADTYPE | If the node is not of type OC_Dimension. |
OtherError | One of the arguments (link, etc.) was invalid. |
Definition at line 590 of file oc.c.
References OC_Dimension, OC_EBADTYPE, OC_NOERR, OCDEREF, and OCVERIFY.
void oc_reclaim_strings | ( | size_t | n, |
char ** | svec | ||
) |