cgio_create_node
(int cgio_num, double pid, const char *name, double *id)¶cgio_create_node_f
(cgio_num, double pid, name, id, ier)¶
|
IN: Database identifier. |
|
IN: Parent node identifier. |
|
IN: Node name (max length 32). |
|
OUT: Node identifier. |
ier
- Error status
- w m
Creates a new empty node in the database given by cgio_num
as a child of the node identified by pid
. The name of the new node is given by name
, and must not already exist as a child of the parent node. The node will contain no label, dimensions, or data. Use the Node Management Routines to change the properties of the node, and the Data I/O Routines to add data. Returns 0 and the identifier of the new node in id
on success, else an error code.
cgio_new_node
(int cgio_num, double pid, const char *name, const char *label, const char *data_type, int ndims, const cgsize_t *dims, const void *data, double *id)¶cgio_new_node_f
(cgio_num, pid, name, label, data_type, ndims, dims, data, id, ier)¶
|
IN: Database identifier. |
|
IN: Parent node identifier. |
|
IN: Node name (max length 32). |
|
IN: Node label (max length 32). |
|
IN: Type of data contained in the node. Options are:
MT - empty
C1 - character data
I4 - 32-bit integer
I8 - 64-bit integer
U4 - unsigned 32-bit integer
U8 - unsigned 64-bit integer
R4 - 32-bit real
R8 - 64-bit real
X4 - 64-bit complex
X8 - 128-bit complex
B1 - byte data
|
|
IN: Number of dimensions for the data (max 12). |
|
IN: Data dimension values ( |
|
IN: Data array to be stored with the node. |
|
OUT: Node identifier. |
ier
- Error status
- w m
Creates a new node in the database given by cgio_num
as a child of the node identified by pid
. The name of the new node is given by name
, and must not already exist as a child of the parent node. The node label is given by label
, the type of data by data_type
, the dimensions of the data by ndims
and dims
, and the data to write to the node by data
. This is equivalent to calling the routines:
cgio_create_node()
cgio_set_label()
cgio_set_dimensions()
cgio_write_all_data()
Returns 0 and the identifier of the new node in id
on success, else an error code.
cgio_delete_node
(int cgio_num, double pid, double id)¶cgio_delete_node_f
(cgio_num, pid, id, ier)¶
|
IN: Database identifier. |
|
IN: Parent node identifier. |
|
IN: Node identifier. |
ier
- Error status
- w m
Deletes the node identified by id
below the parent node identified by pid
in the database given by cgio_num
. All children of the deleted node will also be deleted unless a link is encountered. The link node will be deleted but nothing below it. Returns 0 on success, else an error code.
cgio_move_node
(int cgio_num, double pid, double id, double new_pid)¶cgio_move_node_f
(cgio_num, pid, id, new_pid, ier)¶
|
IN: Database identifier. |
|
IN: Parent node identifier. |
|
IN: Node identifier. |
|
IN: New parent node identifier under which the node is to be moved. |
ier
- Error status
- w m
Moves the node indentified by id
below the parent node identified by pid
to below the new parent node identified by new_pid
in the database given by cgio_num
. A node by the same name as that that for id must not already exist under new_pid
. A node may only be moved if it and the parent nodes all reside in the same physical database. Returns 0 on success, else an error code.
cgio_number_children
(int cgio_num, double id, int *num_child)¶cgio_number_children_f
(cgio_num, id, num_child, ier)¶
|
IN: Database identifier. |
|
IN: Node identifier. |
|
OUT: Number of children of the specified node. |
ier
- Error status
r w m
Gets the number of children of the node identified by id
in the database given by cgio_num
, Returns 0 and the number of children in num_child
on success, else an error code.
cgio_children_names
(int cgio_num, double id, int start, int max_ret, int name_len, int *num_ret, char *child_names)¶cgio_children_names_f
(cgio_num, id, start, max_ret, name_len, num_ret, child_names, ier)¶
|
IN: Database identifier. |
|
IN: Node identifier. |
|
IN: Starting index for returned child names or ids (1 <= |
|
IN: Maximum child names or ids to be returned (1 <= |
|
IN: Length reserved for each returned child name. |
|
OUT: Number of returned values of child names or identifiers. |
|
OUT: Child node names ( |
ier
- Error status
r w m
Gets the names of the children of the node identified by id
in the database given by cgio_num
.
The starting index for the array of names is given by start
,
and the maximum number of names to return by max_ret
.
Both start
and max_ret
should be between 1 and num_child
, inclusively.
The size reserved for each name in child_names
is given by name_len
.
The array child_names
should be dimensioned at least (name_len * max_ret
).
Since node names are limited to a length of CGIO_MAX_NAME_LENGHT
(32), name_len
should be at least 32 to ensure the returned names are not truncated.
In C, an additional byte should be added to name_len
allow for the terminating '0'
for each name. If successfull, the function returns 0; the actual number of returned names is given by num_ret
, and the array of names in child_names
. In C, the names are ‘0’-terminated within each name field. In Fortran, any unused space is padded with blanks (space character).
cgio_children_ids
(int cgio_num, double id, int start, int max_ret, int *num_ret, char *child_ids)¶cgio_children_ids_f
(cgio_num, id, start, max_ret, num_ret, child_ids, ier)¶
|
IN: Database identifier. |
|
IN: Node identifier. |
|
IN: Starting index for returned child names or ids (1 <= |
|
IN: Maximum child names or ids to be returned (1 <= |
|
OUT: Number of returned values of child names or identifiers. |
|
OUT: Child node identifiers ( |
ier
- Error status
r w m
Gets the node identifiers of the children of the node identified by id
in the database given by cgio_num
.
The starting index for the array of ids is given by start
, and the maximum ids to return by max_ret
.
Both start
and max_ret
should be between 1 and num_child
, inclusively.
The array child_ids
should be dimensioned at least (max_ret
).
If successfull, the function returns 0; the actual number of returned ids is given by num_ret
, and the array of identifiers in child_ids
.