object.h 936 B

123456789101112131415161718192021222324252627282930
  1. #ifndef AFUN__OBJECT_H_PUBLIC
  2. #define AFUN__OBJECT_H_PUBLIC
  3. #include "tool.h"
  4. typedef struct af_Object af_Object;
  5. typedef struct af_Inherit af_Inherit;
  6. /* 对象API函数 DLC */
  7. DEFINE_DLC_SYMBOL(pValueAPI, pAPIFUNC);
  8. #include "env.h"
  9. #include "tool.h"
  10. /* 对象创建与释放函数 */
  11. af_Object *makeObject(char *id, size_t data_size, bool inherit_api, bool allow_inherit, af_Object *belong,
  12. af_Inherit *inherit, af_Environment *env);
  13. void freeObject(af_Object *obj);
  14. /* 对象属性获取函数 */
  15. af_Object *getBelongObject(af_Object *object, af_Environment *env);
  16. /* 对象继承关系函数 */
  17. af_Inherit *makeInherit(af_Object *obj);
  18. af_Inherit *freeInherit(af_Inherit *ih);
  19. void freeAllInherit(af_Inherit *ih);
  20. /* 对象API函数 */
  21. void *findObjectAPI(char *api_name, af_Object *obj);
  22. int addAPIToObject(DLC_SYMBOL(pAPIFUNC) func, char *api_name, af_Object *obj);
  23. #endif //AFUN__OBJECT_H_PUBLIC