XWOS API
4.0
XWOS C/C++ API参考手册
|
XWOS通用库:XWOS的对象 更多...
结构体 | |
struct | xwos_object |
XWOS对象 更多... | |
struct | xwobj_d |
XWOS对象描述符 更多... | |
宏定义 | |
#define | xwos_cast(type, obj) ((type)(obj)) |
将对象强制类型转换 | |
#define | XWOS_OBJ_MAGIC 0x58574F53U |
#define | XWOBJ_NILD ((xwobj_d){NULL, 0,}) |
空的XWOS对象对象描述符 | |
类型定义 | |
typedef xwer_t(* | xwobj_gc_f) (struct xwos_object *) |
垃圾回收函数指针类型 | |
函数 | |
void | xwos_objtik_init (void) |
初始化对象标签分配器 | |
void | xwos_object_construct (struct xwos_object *obj) |
XWOS对象的构造函数 | |
void | xwos_object_destruct (struct xwos_object *obj) |
XWOS对象的析构函数 | |
xwer_t | xwos_object_activate (struct xwos_object *obj, xwobj_gc_f gcfunc) |
激活一个XWOS对象(将其引用计数初始化位1) | |
void | xwos_object_setgc (struct xwos_object *obj, xwobj_gc_f gcfunc) |
设置XWOS对象的垃圾回收函数 | |
xwer_t | xwos_object_acquire (struct xwos_object *obj, xwsq_t tik) |
检查对象的标签并增加引用计数 | |
xwer_t | xwos_object_release (struct xwos_object *obj, xwsq_t tik) |
检查对象的标签并减少引用计数 | |
xwer_t | xwos_object_grab (struct xwos_object *obj) |
增加对象的引用计数 | |
xwer_t | xwos_object_put (struct xwos_object *obj) |
减少对象的引用计数 | |
xwer_t | xwos_object_rawput (struct xwos_object *obj) |
减少对象的引用计数,不触发垃圾回收函数 | |
xwsq_t | xwos_object_get_refcnt (struct xwos_object *obj) |
获取XWOS对象的引用计数 | |
XWOS通用库:XWOS的对象
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
在文件 object.h 中定义.