cniDefineNodeClass

name 参数指定的那样定义节点类,它受指定为 factoryObject 参数的节点工厂支持。当装入 LIL 时,在 bipGetMessageFlowNodeFactory 执行期间此函数由节点调用。

如果执行了 cniGetAttributecniGetAttribute2,或 cniGetAttributeNamecniGetAttributeName2,则 cniDefineNodeClass 和 CCI_INV_IMPL_FUNCTION 失败。

语法

void cniDefineNodeClass(
    int*                returnCode,
    CciFactory* factoryObject,
    CciChar*     name,
    CNI_VFT*     functbl);

参数

returnCode
来自函数(输出)的返回码。
可能的返回码是:
  • CCI_SUCCESS
  • CCI_EXCEPTION
  • CCI_INV_FACTORY_OBJECT
  • CCI_INV_NODE_NAME
  • CCI_INV_OBJECT_NAME
  • CCI_INV_VFTP
  • CCI_MISSING_IMPL_FUNCTION
  • CCI_NAME_EXISTS
factoryObject
支持命名节点的工厂对象的地址。从 cniCreateNodeFactory 返回地址(输入)。
name
要定义的节点的名称。节点的名称必须以字符节点结束(输入)。
functbl
CNI_VFT 结构的地址包含到节点实施函数的指针(输入)。此处是函数表的示例:
vftable.iFpCreateNodeContext = _Transform_createNodeContext;
	vftable.iFpDeleteNodeContext = _deleteNodeContext;
	vftable.iFpGetAttributeName2 = _getAttributeName2;
	vftable.iFpSetAttribute = _setAttribute;
	vftable.iFpGetAttribute2     = _getAttribute2;
vftable.iFpEvaluate = _Transform_evaluate; /* if not an input node */
vftable.iFRun = _run /* if an input node */

您通常将仅定义最后 2 个条目中的一个,即,您为消息处理节点定义 vftable.iFpEvaluate = _Transform_evaluate;,或为输入节点定义 vftable.iFpRun = _run;

返回值

无。如果发生错误,则 returnCode 参数表明错误原因。

声明 | 商标 | 下载 | 书库 | 支持 | 反馈
Copyright IBM Corporation 1999, 2006 最后一次更新时间:2006/08/14
as07510_