Ovis_Entity_Destroy_Proc_Set()

摘要

为 Ovis 实体挂接一个销毁过程。

语法

Ovis_Entity_Destroy_Proc_Set (ent_ptr, destroy_proc)
参数 类型 说明
ent_ptr OvisT_Entity * 要挂接销毁过程的实体。
destroy_proc OvisT_Entity_State_Destroy_Proc 要挂接的销毁过程。

返回类型

OvisT_Entity_State_Destroy_Proc

之前的 destroy_proc,若没有则返回 PRGC_NIL。

头文件

ovis_entity.h

详情

该函数将用户定义的 destroy_proc 挂接到 Ovis 实体上。destroy_proc 的原型见 OvisT_Entity_State_Destroy_Proc。

示例

static void new_destroy_proc (OvisT_Entity * entity_ptr, void * user_state_ptr)
   {
   …
   }

OvisT_Entity                        * ent;
OvisT_Entity_State_Destroy_Proc     old_proc;

/* … entity created at some point */

old_proc = Ovis_Entity_Destroy_Proc_Set (entity, new_destroy_proc);

错误

  • 实体为 NIL。

参考

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com