Database Control
After the meta-dictionary has been registered, a single database is opened with the UDA open API function:
MCO_RET mco_uda_db_open( const mco_metadict_header_t * metadict, unsigned short dict_no, mco_uda_dict_class_storage_t *dict_classes_storage, uint2 n_dict_classes_storage);Notice the use of the structure argument
mco_uda_dict_class_storage_t
, it allows redefining the storage type (transient or persistent) for classes at runtime. The structure is defined as:typedef struct { uint2 class_code; /* class code */ uint1 persistence; /* persistent or transient*/ } mco_uda_dict_class_storage_t;Where the persistence argument can have one of the following values:
#define MCO_UDA_CLASS_DEFAULT 0 #define MCO_UDA_CLASS_TRANSIENT 1 #define MCO_UDA_CLASS_PERSISTENT 2Each open database is then closed with the following:
MCO_RET mco_uda_db_close( const mco_metadict_header_t * metadict, unsigned short dict_no );
Note that the native API
mco_db_open_dev()
/mco_db_close()
pair may also be used together with the UDA API.