cdds_count - query fields within DDS structures

SYNOPSIS

#include "cdds.h"

int cdds_count(bin_tag, field_tag);

BIN_TAG bin_tag
FIELD_TAG field_tag

DESCRIPTION

cdds_count returns prime type element count associated with the field_tag. A value of -1 is returned on any error.

INPUT

bin_tag is a binary tag, previously obtained from cdds_open. It specifies a particular binary stream.

field_tag is the tag of the field for which the information is desired. A value of "0" will default to the trace (SEQUENCE).

EXAMPLE

BIN_TAG bin;
FIELD_TAG tag;
int RecNum_size, prec, algn, cnt;
char *name, *genus;
...
/* byte size of RecNum field */
tag = cdds_member(bin, 0, "RecNum");
RecNum_size = cdds_prec(bin, tag);
...
/* scan trace headers */
tag = cdds_member(bin, 0, "");
while (tag)
{
   name  = cdds_name(bin, tag);
   genus = cdds_genus(bin, tag);
   prec  = cdds_prec(bin, tag);
   algn  = cdds_align(bin, tag);
   cnt   = cdds_count(bin, tag);
   ...
   tag = cdds_next(bin, tag);
}
    

SEE ALSO

cdds_member Field member tag
cdds_next Field member next tag
cdds_prev Field member previous tag
cdds_parent Field member parent tag
cdds_prime Field member prime type tag
    

AUTHOR

Jerry Ehlers, BP America (May 2003)