本文整理汇总了C++中CKBehaviorPrototype::SetBehaviorCallbackFct方法的典型用法代码示例。如果您正苦于以下问题:C++ CKBehaviorPrototype::SetBehaviorCallbackFct方法的具体用法?C++ CKBehaviorPrototype::SetBehaviorCallbackFct怎么用?C++ CKBehaviorPrototype::SetBehaviorCallbackFct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKBehaviorPrototype
的用法示例。
在下文中一共展示了CKBehaviorPrototype::SetBehaviorCallbackFct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateGetCIValueProto
/*
*******************************************************************
* Function: CKERROR CreateGetCIValueProto( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Parameters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR CreateGetCIValueProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype(GBL_CI_API_ENTRY("GetCI"));
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("Start");
proto->DeclareOutput("Success");
proto->DeclareInParameter("Configurable Information", CIPARAMETERGUID);
proto->DeclareOutParameter("Configurable Information Value", CKPGUID_STRING);
proto->DeclareSetting("Get CI by unique name",CKPGUID_BOOL,"FALSE");
proto->DeclareSetting("Get value as string",CKPGUID_BOOL,"FALSE");
proto->DeclareSetting("Output custom values",CKPGUID_BOOL,"FALSE");
proto->DeclareSetting("Output on change",CKPGUID_BOOL,"FALSE");
proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)( CKBEHAVIOR_VARIABLEPARAMETEROUTPUTS ));
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetBehaviorCallbackFct(GetCIValueCB);
proto->SetFunction(GetCIValue);
*pproto = proto;
return CK_OK;
}
示例2: CreateRetrieveCIProto
CKERROR CreateRetrieveCIProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype(GBL_CI_API_ENTRY("RetrieveCI"));
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("Start");
proto->DeclareOutput("Success");
proto->DeclareOutput("Error");
proto->DeclareInParameter("Configurable Information ID", CKPGUID_INT);
proto->DeclareOutParameter("Configurable Information Value", CKPGUID_STRING);
proto->DeclareOutParameter("GetErrorCode", GUID_TGBLERROR);
proto->DeclareSetting("Get value as string",CKPGUID_BOOL,"FALSE");
proto->DeclareSetting("Output custom values",CKPGUID_BOOL,"FALSE");
proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)( CKBEHAVIOR_VARIABLEPARAMETEROUTPUTS ));
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetBehaviorCallbackFct(RetrieveCICB);
proto->SetFunction(RetrieveCI);
*pproto = proto;
return CK_OK;
}
示例3: CreatePrototype
/*
*******************************************************************
* Function: CKERROR CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Parameters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR GBLPFDelete::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLPFDelete" );
if ( !behaviorPrototype )
{
return CKERR_OUTOFMEMORY;
}
//--- Inputs declaration
behaviorPrototype->DeclareInput( "In" );
//--- Outputs declaration
behaviorPrototype->DeclareOutput( "OutSuccess" );
behaviorPrototype->DeclareOutput( "OutError" );
//--- Input Parameters declaration
behaviorPrototype->DeclareInParameter( "SetProfileId", GUID_PROFILE_ID );
//--- Output Parameters declaration
behaviorPrototype->DeclareOutParameter( "GetErrorCode", GUID_TGBLERROR );
//---- Local Parameters Declaration
//---- Settings Declaration
behaviorPrototype->SetBehaviorCallbackFct( GBLPFDelete::CallBack, CKCB_BEHAVIORATTACH|CKCB_BEHAVIORDETACH|CKCB_BEHAVIORDELETE|CKCB_BEHAVIOREDITED|CKCB_BEHAVIORSETTINGSEDITED|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORPRESAVE|CKCB_BEHAVIORPOSTSAVE|CKCB_BEHAVIORRESUME|CKCB_BEHAVIORPAUSE|CKCB_BEHAVIORRESET|CKCB_BEHAVIORRESET|CKCB_BEHAVIORDEACTIVATESCRIPT|CKCB_BEHAVIORACTIVATESCRIPT|CKCB_BEHAVIORREADSTATE, NULL );
behaviorPrototype->SetFunction( GBLPFDelete::BehaviourFunction );
*behaviorPrototypePtr = behaviorPrototype;
return CK_OK;
}
示例4: CreateMidiEventBehaviorProto
CKERROR CreateMidiEventBehaviorProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Midi Event");
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("On");
proto->DeclareInput("Off");
proto->DeclareOutput("Activated");
proto->DeclareOutput("Deactivated");
proto->DeclareInParameter("Channel", CKPGUID_INT, "0");
proto->DeclareInParameter("Note 1", CKPGUID_INT, "0");
proto->DeclareLocalParameter(NULL, CKPGUID_BOOL, "FALSE"); // Combination was ok
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetFunction(MidiEvent);
proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)(CKBEHAVIOR_VARIABLEPARAMETERINPUTS));
proto->SetBehaviorCallbackFct( MidiEventCallBack );
*pproto = proto;
return CK_OK;
}
示例5: CreatePrototype
/*
*******************************************************************
* Function: CKERROR CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Paramters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR CGBLCHChatMoveHomogeneous::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCHChatMoveHomogeneous" );
if ( !behaviorPrototype )
{
return CKERR_OUTOFMEMORY;
}
//--- Inputs declaration
behaviorPrototype->DeclareInput( "On" );
//--- Outputs declaration
behaviorPrototype->DeclareOutput( "Done" );
behaviorPrototype->DeclareOutput( "Error" );
//--- Input Parameters declaration
behaviorPrototype->DeclareInParameter( "Frame", CKPGUID_2DENTITY );
behaviorPrototype->DeclareInParameter( "Height", CKPGUID_FLOAT ); //1
behaviorPrototype->DeclareInParameter( "Width", CKPGUID_FLOAT ); //2
behaviorPrototype->DeclareInParameter( "X", CKPGUID_FLOAT ); //3
behaviorPrototype->DeclareInParameter( "Y", CKPGUID_FLOAT ); //4
//---- Local Parameters Declaration
//---- Settings Declaration
behaviorPrototype->SetBehaviorCallbackFct( CGBLCHChatMoveHomogeneous::CallBack, CKCB_BEHAVIORATTACH|CKCB_BEHAVIORDETACH|CKCB_BEHAVIORDELETE|CKCB_BEHAVIOREDITED|CKCB_BEHAVIORSETTINGSEDITED|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORPRESAVE|CKCB_BEHAVIORPOSTSAVE|CKCB_BEHAVIORRESUME|CKCB_BEHAVIORPAUSE|CKCB_BEHAVIORRESET|CKCB_BEHAVIORRESET|CKCB_BEHAVIORDEACTIVATESCRIPT|CKCB_BEHAVIORACTIVATESCRIPT|CKCB_BEHAVIORREADSTATE, NULL );
behaviorPrototype->SetFunction( CGBLCHChatMoveHomogeneous::BehaviourFunction );
*behaviorPrototypePtr = behaviorPrototype;
return CK_OK;
}
示例6: CreateRegisterAttributeTypeProto
//************************************
// Method: CreateRegisterAttributeTypeProto
// FullName: CreateRegisterAttributeTypeProto
// Access: public
// Returns: CKERROR
// Qualifier:
// Parameter: CKBehaviorPrototype **pproto
//************************************
CKERROR CreateRegisterAttributeTypeProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("RegisterAttribute");
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("In");
proto->DeclareOutput("Out");
proto->DeclareOutput("Error");
proto->DeclareInParameter("Name",CKPGUID_STRING);
proto->DeclareInParameter("Category",CKPGUID_STRING);
proto->DeclareInParameter("Default Value",CKPGUID_STRING);
proto->DeclareInParameter("Parameter Type",CKPGUID_PARAMETERTYPE);
proto->DeclareInParameter("Compatible Class",CKPGUID_CLASSID);
proto->DeclareInParameter("User",CKPGUID_BOOL,"TRUE");
proto->DeclareInParameter("Save",CKPGUID_BOOL,"TRUE");
proto->SetBehaviorCallbackFct( RegisterAttributeTypeCB );
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetFunction(RegisterAttributeType);
*pproto = proto;
return CK_OK;
}
示例7: CreateCISIteratorBBProto
/*
*******************************************************************
* Function: CKERROR CreateCISIteratorBBProto( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Parameters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR CreateCISIteratorBBProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype(GBL_CI_API_ENTRY("CISIterator"));
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("On/Reset");
proto->DeclareOutput("Exit On/Reset");
proto->DeclareInput("Loop In");
proto->DeclareOutput("Loop Out");
proto->DeclareOutParameter("value", CKPGUID_STRING,"-1");
proto->DeclareOutParameter("default value", CKPGUID_STRING,"-1");
proto->DeclareOutParameter("unique name", CKPGUID_STRING,"");
proto->DeclareOutParameter("description", CKPGUID_STRING,"-1");
proto->DeclareOutParameter("access flags", CIPRTFLAGSGUID,"");
proto->DeclareOutParameter("parameter type", CKPGUID_PARAMETERTYPE,"-1");
proto->DeclareOutParameter("ci db index", CKPGUID_INT,"-1");
proto->DeclareLocalParameter(NULL, CKPGUID_INT); // index
proto->DeclareLocalParameter(NULL, CKPGUID_INT); // cis size
proto->DeclareLocalParameter(NULL, CKPGUID_POINTER); // ciid list
proto->DeclareSetting("Read From Database", CKPGUID_BOOL,"FALSE");
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetBehaviorCallbackFct(CISIteratorCB);
proto->SetFunction(CISIteratorBB);
*pproto = proto;
return CK_OK;
}
示例8: CreateJD6SetParametersProto
//************************************
// Method: CreateJD6SetParametersProto
// FullName: CreateJD6SetParametersProto
// Access: public
// Returns: CKERROR
// Qualifier:
// Parameter: CKBehaviorPrototype **pproto
//************************************
CKERROR CreateJD6SetParametersProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PJD6SetParameters");
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("In0");
proto->DeclareOutput("Out0");
proto->SetBehaviorCallbackFct( JD6SetParametersCB );
proto->DeclareInParameter("Body B",CKPGUID_3DENTITY,"ball2");
proto->DeclareInParameter("Drive Linear Velocity",CKPGUID_VECTOR);
proto->DeclareInParameter("Drive Angular Velocity",CKPGUID_VECTOR);
proto->DeclareInParameter("Drive Position",CKPGUID_VECTOR);
proto->DeclareInParameter("Drive Orientation",CKPGUID_QUATERNION);
proto->DeclareInParameter("Ratio",CKPGUID_FLOAT,"0");
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE);
proto->SetFunction(JD6SetParameters);
*pproto = proto;
return CK_OK;
}
示例9: CreatePrototype
/*
*******************************************************************
* Function: CKERROR CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Parameters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR GBLPFGetUserIdentity::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLPFGetUserIdentity" );
if ( !behaviorPrototype )
{
return CKERR_OUTOFMEMORY;
}
//--- Inputs declaration
behaviorPrototype->DeclareInput( "In" );
//--- Outputs declaration
behaviorPrototype->DeclareOutput( "Out" );
//--- Output Parameters declaration
behaviorPrototype->DeclareOutParameter( "GetUserId", GUID_USER_ID );
behaviorPrototype->DeclareOutParameter( "GetUsername", CKPGUID_STRING );
behaviorPrototype->DeclareOutParameter( "GetVirtoolsUserId", CKPGUID_INT );
//---- Local Parameters Declaration
//---- Settings Declaration
behaviorPrototype->SetBehaviorCallbackFct( GBLPFGetUserIdentity::CallBack, CKCB_BEHAVIORATTACH|CKCB_BEHAVIORDETACH|CKCB_BEHAVIORDELETE|CKCB_BEHAVIOREDITED|CKCB_BEHAVIORSETTINGSEDITED|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORPRESAVE|CKCB_BEHAVIORPOSTSAVE|CKCB_BEHAVIORRESUME|CKCB_BEHAVIORPAUSE|CKCB_BEHAVIORRESET|CKCB_BEHAVIORRESET|CKCB_BEHAVIORDEACTIVATESCRIPT|CKCB_BEHAVIORACTIVATESCRIPT|CKCB_BEHAVIORREADSTATE, NULL );
behaviorPrototype->SetFunction( GBLPFGetUserIdentity::BehaviourFunction );
*behaviorPrototypePtr = behaviorPrototype;
return CK_OK;
}
示例10: CreateKeyboardCameraOrbitProto
CKERROR CreateKeyboardCameraOrbitProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Keyboard Camera Orbit");
if(!proto) return CKERR_OUTOFMEMORY;
// General Description
CKERROR error = FillGeneralCameraOrbitProto(proto);
if (error != CK_OK)
return (error);
// Additionnal Settings for the Keyboard
proto->DeclareSetting("Key Rotate Left", CKPGUID_KEY,"Left Arrow");
proto->DeclareSetting("Key Rotate Right", CKPGUID_KEY,"Right Arrow");
proto->DeclareSetting("Key Rotate Up", CKPGUID_KEY,"Up Arrow");
proto->DeclareSetting("Key Rotate Down", CKPGUID_KEY,"Down Arrow");
proto->DeclareSetting("Key Zoom In", CKPGUID_KEY,"PREVIOUS");
proto->DeclareSetting("Key Zoom Out", CKPGUID_KEY,"NEXT");
// Set the execution functions
proto->SetFunction(KeyboardCameraOrbit);
proto->SetBehaviorCallbackFct(GeneralCameraOrbitCallback,CKCB_BEHAVIORSETTINGSEDITED|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORCREATE);
// return OK
*pproto = proto;
return CK_OK;
}
示例11: CreateLogEntryProto
CKERROR CreateLogEntryProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("pLogEvent");
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("In");
proto->DeclareInput("Off");
proto->DeclareOutput("Message");
proto->DeclareOutput("Error");
proto->DeclareOutput("Warning");
proto->DeclareOutput("Info");
proto->DeclareOutput("Trace");
proto->DeclareOutput("Debug");
proto->DeclareOutParameter("Entry",CKPGUID_STRING);
proto->DeclareOutParameter("Type",CKPGUID_INT);
proto->DeclareOutParameter("Component",CKPGUID_STRING);
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)( CKBEHAVIOR_VARIABLEPARAMETERINPUTS ));
proto->SetFunction(LogEntry);
proto->SetBehaviorCallbackFct(LogEntryCB);
*pproto = proto;
return CK_OK;
}
示例12: CreatePrototype
/*
*******************************************************************
* Function: CKERROR CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Parameters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR CGBLLAERemoveUser::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLLAERemoveUserBB" );
if ( !behaviorPrototype )
{
return CKERR_OUTOFMEMORY;
}
//--- Inputs declaration
behaviorPrototype->DeclareInput( "RemoveUser" );
//--- Outputs declaration
behaviorPrototype->DeclareOutput( "UserRemoved" );
behaviorPrototype->DeclareOutput( "Error" );
//--- Input Parameters declaration
behaviorPrototype->DeclareInParameter( "LAEID", GUID_GBLLAEID );
behaviorPrototype->DeclareInParameter( "LAEUserIDList", CKPGUID_DATAARRAY );
//--- Output Parameters declaration
behaviorPrototype->DeclareOutParameter( "Error", GUID_TGBLERROR );
//---- Local Parameters Declaration
//---- Settings Declaration
behaviorPrototype->SetBehaviorCallbackFct( CGBLLAERemoveUser::CallBack, CKCB_BEHAVIORATTACH|CKCB_BEHAVIORDETACH|CKCB_BEHAVIORDELETE|CKCB_BEHAVIOREDITED|CKCB_BEHAVIORSETTINGSEDITED|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORPRESAVE|CKCB_BEHAVIORPOSTSAVE|CKCB_BEHAVIORRESUME|CKCB_BEHAVIORPAUSE|CKCB_BEHAVIORRESET|CKCB_BEHAVIORRESET|CKCB_BEHAVIORDEACTIVATESCRIPT|CKCB_BEHAVIORACTIVATESCRIPT|CKCB_BEHAVIORREADSTATE, NULL );
behaviorPrototype->SetFunction( CGBLLAERemoveUser::BehaviourFunction );
*behaviorPrototypePtr = behaviorPrototype;
return CK_OK;
}
示例13: CreateARTPlusPatternTransformationProto
CKERROR CreateARTPlusPatternTransformationProto(CKBehaviorPrototype** pproto)
{
CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Single Marker Transformation");
if(!proto) return CKERR_OUTOFMEMORY;
//--- Inputs declaration
proto->DeclareInput("In");
//--- Outputs declaration
proto->DeclareOutput("Out");
//----- Input Parameters Declaration
proto->DeclareInParameter("Object", CKPGUID_3DENTITY);
proto->DeclareInParameter("Pattern Number",CKPGUID_INT, "0");
proto->DeclareInParameter("Pattern Width (cm)", CKPGUID_FLOAT, "8.0");
//--- Output Parameters Declaration
proto->DeclareOutParameter("Position",CKPGUID_VECTOR);
proto->DeclareOutParameter("Quaternion",CKPGUID_QUATERNION);
proto->DeclareOutParameter("Marker ID",CKPGUID_INT, "-1");
proto->DeclareOutParameter("Detected",CKPGUID_BOOL, FALSE);
proto->DeclareOutParameter("Transformation Matrix",CKPGUID_MATRIX);
//---- Local Parameters Declaration
//---- Settings Declaration
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetBehaviorCallbackFct(ARTPlusPatternTransformationCB,CKCB_BEHAVIORBASE|CKCB_BEHAVIOREDITIONS|CKCB_BEHAVIORPAUSE|CKCB_BEHAVIORREADSTATE|CKCB_BEHAVIORRESET|CKCB_BEHAVIORACTIVATESCRIPT|CKCB_BEHAVIORDEACTIVATESCRIPT|CKCB_BEHAVIORRESUME|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORNEWSCENE,NULL);
proto->SetFunction(ARTPlusPatternTransformation);
*pproto = proto;
return CK_OK;
}
示例14: CreatePlayFFEffectProto
CKERROR CreatePlayFFEffectProto(CKBehaviorPrototype **pproto)
{
CKBehaviorPrototype *proto = NULL;
proto = CreateCKBehaviorPrototype("PlayFFEffect");
if(!proto) return CKERR_OUTOFMEMORY;
proto->DeclareInput("Init");
proto->DeclareInput("play");
proto->DeclareInput("stop");
proto->DeclareInput("release device");
proto->DeclareOutput("initiated");
proto->DeclareOutput("play exit");
proto->DeclareOutput("stopped");
proto->DeclareOutput("released");
proto->DeclareOutput("error");
proto->DeclareInParameter("effect file",CKPGUID_STRING);
proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
proto->SetFunction( PlayFFEffect );
proto->SetBehaviorCallbackFct(PlayFFECallBackObject);
*pproto = proto;
return CK_OK;
}
示例15: CreatePrototype
/*
*******************************************************************
* Function: CKERROR CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
*
* Description : The prototype creation function will be called the first time
* a behavior must be created to create the CKBehaviorPrototype
* that contains the description of the behavior.
*
* Parameters :
* behaviorPrototypePtr w Pointer to a CKBehaviorPrototype object that
* describes the behavior's internal structure
* and relationships with other objects.
*
* Returns : CKERROR
*
*******************************************************************
*/
CKERROR GBLStorageManagerStateTestBB::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLStorageManagerStateTestBB" );
if ( !behaviorPrototype )
{
return CKERR_OUTOFMEMORY;
}
//--- Inputs declaration
behaviorPrototype->DeclareInput( "In0" );
//--- Outputs declaration
behaviorPrototype->DeclareOutput( "Out0" );
//---- Local Parameters Declaration
//---- Settings Declaration
behaviorPrototype->SetBehaviorCallbackFct( GBLStorageManagerStateTestBB::CallBack, CKCB_BEHAVIORATTACH|CKCB_BEHAVIORDETACH|CKCB_BEHAVIORDELETE|CKCB_BEHAVIOREDITED|CKCB_BEHAVIORSETTINGSEDITED|CKCB_BEHAVIORLOAD|CKCB_BEHAVIORPRESAVE|CKCB_BEHAVIORPOSTSAVE|CKCB_BEHAVIORRESUME|CKCB_BEHAVIORPAUSE|CKCB_BEHAVIORRESET|CKCB_BEHAVIORRESET|CKCB_BEHAVIORDEACTIVATESCRIPT|CKCB_BEHAVIORACTIVATESCRIPT|CKCB_BEHAVIORREADSTATE, NULL );
behaviorPrototype->SetFunction( GBLStorageManagerStateTestBB::BehaviourFunction );
*behaviorPrototypePtr = behaviorPrototype;
return CK_OK;
}