Return the number of structures/classes for a dictionary.
MCO_RET mco_dict_struct_count( /*IN*/ mco_metadict_header_t * metadict,
/*IN*/ unsigned short dict_no,
/*OUT*/ unsigned short * count );
| metadict | The address of an initialized mco_metadict_header_t structure |
|
dict_no |
The number of the dictionary ( must be between 0 and |
|
count |
The address of a variable to receive the number of databases |
This function returns the number of structures/classes for the dictionary referred to by the index
dict_noin the arraymetadict->entries[].
| MCO_S_OK | The count was successfully returned |
| MCO_E_UDA_DICT_NOTFOUND | The dictionary is not registered |
Application snippet:
const char * dbname = "SimpleDb";
int main(int argc, char* argv[])
{
MCO_RET rc;
unsigned int dict_no = 0;
unsigned int count;
mco_metadict_header_t *header;
...
header = (mco_metadict_header_t *) malloc(size);
mco_metadict_init(header, size); /* initialize the metadict */
...
rc = mco_dict_struct_count(header, dict_no, &count);
...
}