Previous: Object types, Up: Object types


2.3.1 Data model api for objects

— Function: ferret_string_t dm_object_get_name (dm_oid_t oid)

Return the name of the object identified by OID, or NULL if it is an unnamed object.

— Function: dm_oid_t dm_object_create (int object_type, void *object_data)

Creates a new object into the data model of type OBJECT_TYPE. The object is created to contain OBJECT_DATA.

The otype->callbacks->create callback is called with OBJECT_DATA.

— Function: state_t dm_object_destroy (dm_oid_t oid)

Destroys the object identified with OID.

The otype->callbacks->destroy callback is called.

— Function: state_t dm_object_destroy_by_name (ferret_string_t name)

Destroys the collection of objects identified by NAME.

The otype->callbacks->destroy callback is called for each object in the collection.

— Function: state_t dm_object_set_data (dm_oit_t oid, void *object_data)

Set OBJECT_DATA as the private data of the object identified by OID.

The otype->callbacks->set callback is called with OBJECT_DATA.

— Function: state_t dm_object_set_data_by_name (ferret_string_t name, void *object_data)

Set OBJECT_DATA as the private data of all objects called NAME within the datamodel.

— Function: void *dm_object_get_data (dm_oit_t oid)

Get the private data of the object identified by OID.

The otype->callbacks->get callback is called.