WYRDTEK Home Features Reference Downloads About


Reference/es_mb_getclassbyid

Syntax

int es_mb_getclassbyid( struct es_mb *db, unsigned classid, struct es_mbc **res );

Arguments

struct es_mb *db Database.
unsigned classid Class integer identifier.
struct es_mbc **res Assigned result. Passed by reference.

Return Codes

ES_ERROR_NONE Success. No errors.
ES_ERROR_UNKNOWNCLASS No class exists that corresponds to the class integer identifier classid.

Description

Retrieves the class from the database definition underlying the database parameter, db, corresponding to the class integer identifier classid.

Each class is assigned an integer identifier known as a class-id. Classids fall in the range 0..N-1, where N is the total number of classes in a database. es_mb_getnumclasses() returns N.

es_mbc_getclassid() returns the classid given a class definition object.

[Back To Reference] [Back To Reference/es_mb]