メソッドのインプリメンテーションを定義するには、以下のモデルを使用します。
PXSTC_Code PX_Method(PX_OperatorHandle operatorHandle, PX_LongInt phase)
{
.
return(PXSTC_EndMethod);
}
ここで、PX_Methodは以下のいずれかです。
- PX_Initiate
- PX_Execute
- PX_Checkpoint
- PX_Restart
- PX_Event
- PX_Terminate
例 - メソッドの定義
以下の例は、アクセス オペレータ用のメソッドの定義方法を示したものです。
/**** INITIATE method ****/ PXSTC_Code PX_Initiate(PX_OperatorHandle operatorHandle, PX_LongInt phase) { . return(PXSTC_EndMethod); } /**** EXECUTE method ****/ PXSTC_Code PX_Execute(PX_OperatorHandle operatorHandle, PX_LongInt phase) { . return(PXSTC_EndMethod); } /**** TERMINATE method ****/ PXSTC_Code PX_Terminate(PX_OperatorHandle operatorHandle, PX_LongInt phase) { . return(PXSTC_EndMethod); } /**** CHECKPOINT method ****/ PXSTC_Code PX_Checkpoint(PX_OperatorHandle operatorHandle, PX_LongInt phase) { . return(PXSTC_EndMethod); } /**** RESTART method ****/ PXSTC_Code PX_Restart(PX_OperatorHandle operatorHandle, PX_LongInt phase) { return(PXSTC_EndMethod); } /**** EVENT method ****/ PXSTC_Code PX_Event(PX_OperatorHandle operatorHandle, PX_LongInt phase) { return(PXSTC_EndMethod); } } PX_DefineOperator(“MyOperatorName”, PX_MultiPhase);