TIM SDK
TIM API C
|
|
Base object.
Macros | |
#define | ta_object_invalid ((ta_object_t)0) |
Invalid object (null-pointer). | |
Typedefs | |
typedef struct _ta_object * | ta_object_t |
Opaque object handler. | |
Functions | |
ta_e_result_code_t | ta_object_retain (ta_object_t object) |
Retain object instance. More... | |
ta_e_result_code_t | ta_object_release (ta_object_t object) |
Release object instance. More... | |
ta_e_result_code_t | ta_object_release_if_valid (ta_object_t object) |
Release object instance if object is not ta_object_invalid. More... | |
ta_e_result_code_t | ta_object_to_string (ta_object_t object, ta_object_t *string) |
String representation of object instance. More... | |
ta_e_result_code_t ta_object_release | ( | ta_object_t | object | ) |
Release object instance.
Object instance is destroyed once nobody retains the object instance anymore.
[in] | object | Object instance to release. |
ta_c_rc_ok | Object instance has been released. |
ta_c_rc_invalid_argument | object is ta_object_invalid. |
ta_c_rc_* | Last object instance released but failed disposing of object. |
ta_e_result_code_t ta_object_release_if_valid | ( | ta_object_t | object | ) |
Release object instance if object is not ta_object_invalid.
Convenience method to clean up object instance which are potentially not created yet. If you use this method make sure to always initialize ta_object_t with ta_object_invalid.
[in] | object | Object instance to release. Object instance can be ta_object_invalid. |
ta_c_rc_ok | If object instance is not ta_object_invalid object instance has been released. |
ta_c_rc_* | Last object instance released but failed disposing of object. |
ta_e_result_code_t ta_object_retain | ( | ta_object_t | object | ) |
Retain object instance.
Retain object instance ensures the instance is keep alive as long as the user requires working with the object instance. Call ta_object_release if the user does not access the object instance anymore in the future. The object instance is destroyed once nobody retains the object instance anymore.
[in] | object | Object instance to retain. |
ta_c_rc_ok | Object instance retained. |
ta_c_rc_invalid_argument | object is ta_object_invalid. |
ta_e_result_code_t ta_object_to_string | ( | ta_object_t | object, |
ta_object_t * | string | ||
) |
String representation of object instance.
For debugging use. Object instance produces a string representing the object instance content. Depending on the object instance this can be a short or long string.
[in] | object | Object instance to get string representation for. |
[out] | string | Pointer to variable to write object instance to. Object instance is retained. |
ta_c_rc_ok | Object instance written to string. Object instance has been retained. |
ta_c_rc_invalid_argument | string is null-pointer. |
ta_c_rc_out_of_memory | Failed allocating memory. |