improve api docs

This commit is contained in:
lixianjing 2021-12-24 17:35:53 +08:00
parent ec3550a098
commit 4e16c608ea
9 changed files with 66 additions and 0 deletions

View File

@ -5,6 +5,7 @@
* 修复SDL释放的时候内存泄露的问题感谢智明提供补丁
* 增加状态机(感谢林福提供补丁)
* 修复单元测试兼容非utf8编码的编译器VS2015(感谢雨欣提供补丁)
* 完善部分cast函数的文档。
2021/12/23
* 增加aworkslp平台支持(感谢林福提供补丁)

View File

@ -370,7 +370,16 @@ ret_t object_array_sort_as_double(tk_object_t* obj, bool_t ascending);
*/
ret_t object_array_sort_as_str(tk_object_t* obj, bool_t ascending, bool_t ignore_case);
/**
* @method object_array_cast
* object_array对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_array对象
*
* @return {object_array_t*} object_array对象
*/
object_array_t* object_array_cast(tk_object_t* obj);
#define OBJECT_ARRAY(obj) object_array_cast(obj)
END_C_DECLS

View File

@ -56,6 +56,14 @@ typedef struct _object_compositor_t {
*/
tk_object_t* object_compositor_create(tk_object_t* obj1, tk_object_t* obj2);
/**
* @method object_compositor_cast
* object_compositor对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_compositor对象
*
* @return {object_compositor_t*} object_compositor对象
*/
object_compositor_t* object_compositor_cast(tk_object_t* obj);
#define OBJECT_COMPOSITOR(obj) object_compositor_cast(obj)

View File

@ -58,6 +58,14 @@ typedef struct _object_date_time_t {
*/
tk_object_t* object_date_time_create(void);
/**
* @method object_date_time_cast
* object_date_time对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_date_time对象
*
* @return {object_date_time_t*} object_date_time对象
*/
object_date_time_t* object_date_time_cast(tk_object_t* obj);
#define OBJECT_DATE_TIME(obj) object_date_time_cast(obj)

View File

@ -123,6 +123,14 @@ ret_t object_default_clear_props(tk_object_t* obj);
*/
value_t* object_default_find_prop(tk_object_t* obj, tk_compare_t cmp, const void* data);
/**
* @method object_default_cast
* object_default对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_default对象
*
* @return {object_default_t*} object_default对象
*/
object_default_t* object_default_cast(tk_object_t* obj);
#define OBJECT_DEFAULT(obj) object_default_cast(obj)

View File

@ -56,6 +56,14 @@ typedef struct _object_locker_t {
*/
tk_object_t* object_locker_create(tk_object_t* obj);
/**
* @method object_locker_cast
* object_locker对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_locker对象
*
* @return {object_locker_t*} object_locker对象
*/
object_locker_t* object_locker_cast(tk_object_t* obj);
#define OBJECT_LOCKER(obj) object_locker_cast(obj)

View File

@ -63,6 +63,14 @@ typedef struct _object_rbuffer_t {
*/
tk_object_t* object_rbuffer_create(const uint8_t* data, uint32_t capacity);
/**
* @method object_rbuffer_cast
* object_rbuffer对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_rbuffer对象
*
* @return {object_rbuffer_t*} object_rbuffer对象
*/
object_rbuffer_t* object_rbuffer_cast(tk_object_t* obj);
#define OBJECT_RBUFFER(obj) object_rbuffer_cast(obj)

View File

@ -60,6 +60,14 @@ typedef struct _object_typed_array_t {
*/
tk_object_t* object_typed_array_create(value_type_t type, uint32_t capacity);
/**
* @method object_typed_array_cast
* object_typed_array对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_typed_array对象
*
* @return {object_typed_array_t*} object_typed_array对象
*/
object_typed_array_t* object_typed_array_cast(tk_object_t* obj);
#define OBJECT_TYPED_ARRAY(obj) object_typed_array_cast(obj)

View File

@ -75,6 +75,14 @@ tk_object_t* object_wbuffer_create(uint8_t* data, uint32_t capacity);
*/
tk_object_t* object_wbuffer_create_extendable(void);
/**
* @method object_wbuffer_cast
* object_wbuffer对象
* @annotation ["cast"]
* @param {tk_object_t*} obj object_wbuffer对象
*
* @return {object_wbuffer_t*} object_wbuffer对象
*/
object_wbuffer_t* object_wbuffer_cast(tk_object_t* obj);
#define OBJECT_WBUFFER(obj) object_wbuffer_cast(obj)