cdds_object - fetch field tag within DDS structures

SYNOPSIS

#include "cdds.h"

FIELD_TAG cdds_object(bin_tag, field_tag, field_name);

BIN_TAG bin_tag
FIELD_TAG field_tag
const char *field_name

DESCRIPTION

cdds_object returns the tag associated with the given field_name that is an object of the block associated with the tag, field_tag. If field_tag is zero, it defaults to the block which includes SEQUENCE (trace type) associated with bin_tag. If field_name is blank, the returned value will be the tag associated with the first object of the block. The functions, cdds_next, cdds_prev and cdds_parent allow traversing through the block's objects.

INPUT

bin_tag is the tag associated with an open binary, previously obtained from cdds_open. It specifies a particular binary stream.

field_tag is the tag associated with a particular field known by bin_tag.

field_name is a string that names a member or object field within field_tag. If field_name is zero length or blank, the returned tag defaults to the first member or object in the structure, field_tag.

OUTPUT

The return value is the field tag associate with the desired object or -1 if none found.

EXAMPLE

BIN_TAG bin;
FIELD_TAG tag;
...
/* find tag of first block in trace */
tag = cdds_object(bin, 0, "");
    

SEE ALSO

cdds_prec Field precision
cdds_count Field count
cdds_align Field alignment
cdds_genus Field generic type
cdds_name Field name
    

AUTHOR

Jerry Ehlers, BP America (May 2003)