示例#1
0
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;
}
示例#2
0
CKERROR CreateGetFileProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Get File");
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("Start Download");
	
	proto->DeclareOutput("Download Started");

	proto->DeclareOutput("Finish");

	proto->DeclareOutput("Error");

	proto->DeclareInParameter("RemoteFile", CKPGUID_STRING);
	proto->DeclareInParameter("LocalFile", CKPGUID_STRING);
	
	proto->DeclareOutParameter("Length in Bytes", CKPGUID_INT);
	proto->DeclareOutParameter("Current Download in Bytes", CKPGUID_INT);
	proto->DeclareOutParameter("Current Download in %", CKPGUID_PERCENTAGE);
	proto->DeclareOutParameter("Error Code", CKPGUID_INT);
	
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetFunction(GetFile);
	*pproto = proto;
	return CK_OK;
}
//************************************
// Method:    CreatePClothAttachVertexToPositionProto
// FullName:  CreatePClothAttachVertexToPositionProto
// Access:    public 
// Returns:   CKERROR
// Qualifier:
// Parameter: CKBehaviorPrototype **pproto
//************************************
CKERROR CreatePClothAttachVertexToPositionProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PClothAttachVertexToPosition");
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("In");
	proto->DeclareOutput("Out");

	/*! \page PClothAttachVertexToPosition  

	PClothAttachVertexToPosition is categorized in \ref Clothes

	<h3>Description</h3>
	Apply to a <A HREF="Documentation.chm::/beobjects/1_ck3dentity.html">3DEntity</A><br>
	Attaches a cloth vertex to a position in world space.<br>

	@see pCloth::attachVertexToGlobalPosition()


	<h3>Technical Information</h3>

	\image html PClothAttachVertexToPosition.png

	<SPAN CLASS="in">In: </SPAN>triggers the process
	<BR>
	<SPAN CLASS="out">Out: </SPAN>is activated when the process is completed.
	<BR>
	<BR>
	
	
	<SPAN CLASS="pin">Target: </SPAN>Target cloth reference.
	<BR>
	<BR>

	<BR>
	<BR>
	<SPAN CLASS="pin">Vertex Index: </SPAN>Index of the vertex to attach.
	<BR>
	<BR>

	<SPAN CLASS="pin">Global Position: </SPAN>TThe position in world space.
	<BR>
	<BR>

	*/

	proto->SetBehaviorCallbackFct( PClothAttachVertexToPositionCB );

	proto->DeclareInParameter("Vertex Index",CKPGUID_INT);
	proto->DeclareInParameter("Global Position",CKPGUID_VECTOR);


	
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE);
	
	proto->SetFunction(PClothAttachVertexToPosition);
	*pproto = proto;
	return CK_OK;
}
示例#4
0
CKERROR CreateNeoSetMousePosProto(CKBehaviorPrototype** pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Set Mouse Pos");
	if (!proto) {
		return CKERR_OUTOFMEMORY;
	}

//---     Inputs declaration
	proto->DeclareInput("Set");

//---     Outputs declaration
	proto->DeclareOutput("Done");

//---     Input Parameters declaration
	proto->DeclareInParameter("X", CKPGUID_INT,"100");
	proto->DeclareInParameter("Y", CKPGUID_INT,"100");
	proto->DeclareInParameter("Keep Active", CKPGUID_BOOL, "TRUE");
//	proto->DeclareSetting("Keep Active",CKPGUID_BOOL,"TRUE");
//	proto->DeclareLocalParameter("KeepActive", CKPGUID_BOOL);


//----	Local Parameters Declaration

//----	Settings Declaration

	proto->SetBehaviorCallbackFct(NeoSetMousePosCallBack, NULL);
	proto->SetFunction(NeoSetMousePos);

	*pproto = proto;
	return CK_OK;
}
/*
 *******************************************************************
 * 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 GBLPFAddProfileField::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
    CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLPFAddProfileField" );
    if ( !behaviorPrototype ) 
    {
        return CKERR_OUTOFMEMORY;
    }
    
//---     Inputs declaration
	behaviorPrototype->DeclareInput( "In0" );

//---     Outputs declaration
	behaviorPrototype->DeclareOutput( "Out0" );
	behaviorPrototype->DeclareOutput( "Out1" );

//---     Input Parameters declaration
	behaviorPrototype->DeclareInParameter( "SetFieldName", CKPGUID_STRING );
	behaviorPrototype->DeclareInParameter( "SetProfileID", GUID_PROFILE_ID );
	behaviorPrototype->DeclareInParameter( "SetLAEID", CKPGUID_INT );
	behaviorPrototype->DeclareInParameter( "SetLOID", CKPGUID_INT );
	behaviorPrototype->DeclareInParameter( "SetType", EGBLProfileFieldTypeGUID );

//---     Output Parameters declaration
	behaviorPrototype->DeclareOutParameter( "GetErrorCode", GUID_TGBLERROR );

    //----	Local Parameters Declaration
    
    //----	Settings Declaration

	behaviorPrototype->SetBehaviorCallbackFct( GBLPFAddProfileField::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( GBLPFAddProfileField::BehaviourFunction );
    
    *behaviorPrototypePtr = behaviorPrototype;
    return CK_OK;
}
/*
 *******************************************************************
 * 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;
}
示例#7
0
CKERROR CreateTextureSinusProto(CKBehaviorPrototype **pproto)
{
    CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Texture Sine2");

    proto->DeclareInput("In");
    proto->DeclareOutput("Out");

    proto->DeclareInParameter("X Amplitude", CKPGUID_FLOAT,"0.1" );
    proto->DeclareInParameter("Y Amplitude", CKPGUID_FLOAT ,"0.1");
    proto->DeclareInParameter("Velocity", CKPGUID_FLOAT ,"1");
    proto->DeclareInParameter("Channel", CKPGUID_INT, "-1");

    proto->DeclareInParameter("target", CKPGUID_MESH, "-1");


    proto->DeclareLocalParameter(NULL, CKPGUID_VOIDBUF );		// Data
    proto->DeclareLocalParameter(NULL, CKPGUID_FLOAT, "0.0" );	// Time

    proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
    proto->SetFunction(TextureSinus);

    proto->SetBehaviorCallbackFct(TextureSinusCallBackObject);

    *pproto = proto;
    return CK_OK;

}
示例#8
0
CKERROR CreateFTPLoginProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("FTP Login");
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("Login");
	proto->DeclareInput("Logout");

	proto->DeclareOutput("Login Exit");
	proto->DeclareOutput("Logout Exit");
	proto->DeclareOutput("Error");

	proto->DeclareInParameter("Host", CKPGUID_STRING,"127.0.0.1");
	proto->DeclareInParameter("User", CKPGUID_STRING,"ich");
	proto->DeclareInParameter("Password", CKPGUID_STRING,"ich");
	proto->DeclareInParameter("Port", CKPGUID_INT,"21");
	

	proto->DeclareOutParameter("Error Code 0=ok", CKPGUID_INT,"0");
	
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetFunction(FTPLogin);
	*pproto = proto;
	return CK_OK;
}
示例#9
0
CKERROR CreateDirToArrayProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("Dir to Array");
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("Fill");
	proto->DeclareInput("Loop In");

	proto->DeclareOutput("Reseted");
	proto->DeclareOutput("Loop Out");

	proto->DeclareInParameter("Directory", CKPGUID_STRING,"0");
	proto->DeclareInParameter("Mask", CKPGUID_STRING,"0");
	proto->DeclareInParameter("Recursive", CKPGUID_BOOL,"0");


	
	proto->DeclareOutParameter("entry", CKPGUID_STRING);
	proto->DeclareOutParameter("counter", CKPGUID_INT);

	
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetFunction(DirToArray);
	*pproto = proto;
	return CK_OK;
}
示例#10
0
/*
 *******************************************************************
 * 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;
}
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;
}
示例#12
0
/*
 *******************************************************************
 * Function: int CreateBehaviourPrototype() 
 *
 * Description : Returns the number of plugins in this DLL
 *		
 * Paramters :
 *    CKBehaviorPrototype w ppProto
 *
 * Returns : CKERROR - Standard virtools return type
 *
 *******************************************************************
 */
CKERROR CGBLLOStopTimer::CreateBehaviourPrototype(CKBehaviorPrototype** ppProto)
{
	CKERROR err = CK_OK;

	// Create the CKBehaviorPrototype object
	CKBehaviorPrototype *pProto = CreateCKBehaviorPrototype("GBLLOStopTimer");
	if (!pProto)
		return NULL;

	// Set the B-Ins, B-Outs, P-Ins and P-Outs
	if (eParamInputMO != pProto->DeclareInParameter("Set Measured Objective", CKGUID_CGBLMO_PARAMETER))
		assert(NULL);
	if (eParamInputMeasurement != pProto->DeclareInParameter("Set Measurement", CKGUID_CGBLM_PARAMETER))
		assert(NULL);
	if (eParamOutputGetError != pProto->DeclareOutParameter("Get Error", GUID_TGBLERROR))
		assert(NULL);
	if (eBehInputStart != pProto->DeclareInput("InStart"))
		assert(NULL);
	if (eBehOutputDone != pProto->DeclareOutput("OutDone"))
		assert(NULL);
	if (eBehOutputError != pProto->DeclareOutput("OutError"))
		assert(NULL);
	
	// flags
	pProto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);

	// Set the behaviour function
	pProto->SetFunction(BehaviourFunction);

	// Everything must have gone OK, pass back Proto pointer to Virtools
	*ppProto = pProto;
	return err;

	return err;
}
示例#13
0
/*
 *******************************************************************
 * 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 GBLPFRemovePlayer::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{
    CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLPFRemovePlayer" );
    if ( !behaviorPrototype ) 
    {
        return CKERR_OUTOFMEMORY;
    }
    
//---     Inputs declaration
	behaviorPrototype->DeclareInput( "In" );

//---     Outputs declaration
	behaviorPrototype->DeclareOutput( "OutSuccess" );
	behaviorPrototype->DeclareOutput( "OutError" );

//---     Input Parameters declaration
	behaviorPrototype->DeclareInParameter( "SetPlayer", GUID_USER_ID );
	behaviorPrototype->DeclareInParameter( "SetTeam", GUID_TEAM_ID );

//---     Output Parameters declaration
	behaviorPrototype->DeclareOutParameter( "GetErrorCode", GUID_TGBLERROR );

    //----	Local Parameters Declaration
    
    //----	Settings Declaration

	behaviorPrototype->SetBehaviorCallbackFct( GBLPFRemovePlayer::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( GBLPFRemovePlayer::BehaviourFunction );
    
    *behaviorPrototypePtr = behaviorPrototype;
    return CK_OK;
}
示例#14
0
CKERROR CreateDOOwnerChangedProto(CKBehaviorPrototype **pproto)
{
    CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("DOOwnerChanged");
    if(!proto) return CKERR_OUTOFMEMORY;



    proto->DeclareInput("On");
    proto->DeclareInput("Off");

    proto->DeclareOutput("Exit On");
    proto->DeclareOutput("Exit Off");
    proto->DeclareOutput("New Owner");
    proto->DeclareOutput("Object Released");
    proto->DeclareOutput("Error");



    proto->DeclareInParameter("Connection ID", CKPGUID_INT, "0");
    proto->DeclareInParameter("Object", CKPGUID_BEOBJECT, "test");

    proto->DeclareOutParameter("Owner ID", CKPGUID_ID, "-1");
    proto->DeclareOutParameter("Error", VTE_NETWORK_ERROR, "Ok");


    proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
    proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)( CKBEHAVIOR_VARIABLEPARAMETEROUTPUTS  ));
    proto->SetFunction(DOOwnerChanged);
    proto->SetBehaviorCallbackFct(DOOwnerChangedCB);

    *pproto = proto;
    return CK_OK;

}
示例#15
0
//************************************
// Method:    CreateJDestroyProto
// FullName:  CreateJDestroyProto
// Access:    public 
// Returns:   CKERROR
// Qualifier:
// Parameter: CKBehaviorPrototype **pproto
//************************************
CKERROR CreateJDestroyProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PJDestroy");
	if(!proto) return CKERR_OUTOFMEMORY;

	/*! \page PJDestroy  

	<br>
	PJDestroy is categorized in \ref Joints
	<br>
	<br>See <A HREF="PJDestroy.cmo">PJDestroy.cmo</A>.

	<h3>Description</h3>
	Apply to a <A HREF="Documentation.chm::/beobjects/1_ck3dentity.html">3DEntity</A><br>
	Deletes a joint, given by references and type.

	<br>

	<h3>Technical Information</h3>

	\image html PJDestroy.png


	<SPAN CLASS="in">In: </SPAN> triggers the process
	<BR>
	<SPAN CLASS="out">Out: </SPAN> is activated when the process is completed.
	<BR>

	<SPAN CLASS="pin">Body B: </SPAN> The second body. Leave blank to create a joint constraint with the world. 
	<BR>

	<SPAN CLASS="pin">Joint Type:</SPAN> The joint type. This helps the building block to identify a joint constraint. As usual there can be only one joint of the type x between two bodies.
	<BR>

	<b>Sleeping:</b> This call wakes the actor(s) if they are sleeping.

	Is utilizing #pRigidBody #pWorld #PhysicManager #pWorld::deleteJoint().<br>
	*/

	proto->DeclareInput("In");
	proto->DeclareOutput("Out");

	proto->SetBehaviorCallbackFct( JDestroyCB );
	
	proto->DeclareInParameter("Body B",CKPGUID_3DENTITY,"ball2");
	proto->DeclareInParameter("Type",VTE_JOINT_TYPE,"");

	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE);

	proto->SetFunction(JDestroy);
	*pproto = proto;
	return CK_OK;
}
示例#16
0
/*
 *******************************************************************
 * 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;
}
示例#17
0
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;
}
示例#18
0
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;

}
示例#19
0
CKERROR GBLCOSetID::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
{

#if GBL_RUNTIME
    // Not editable from Virtools Dev
    CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototypeRunTime( "GBLCOSetID" );
#elif GBL_GAMEDEVELOPER
    // Edition depend on the BB.
    CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCOSetID" );
#else
    // Editable from Virtools Dev
    CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCOSetID" );
#endif

    if ( !behaviorPrototype )
        return CKERR_OUTOFMEMORY;

    //---     Inputs declaration
    behaviorPrototype->DeclareInput( "InSetIdentity" );

    //---     Outputs declaration
    behaviorPrototype->DeclareOutput( "OutIdentitySet" );
    behaviorPrototype->DeclareOutput( "OutError" );

    //---     Parameter Input declaration
    behaviorPrototype->DeclareInParameter("SetLAID", GUID_TGBLLAID);

    //---     Parameter Output declaration
    behaviorPrototype->DeclareOutParameter("GetError", GUID_TGBLERROR);

    behaviorPrototype->SetFunction(GBLCOSetID::BehaviourFunction);

    *behaviorPrototypePtr = behaviorPrototype;
    return CK_OK;
}
示例#20
0
/*
 *******************************************************************
 * Function: int CreateBehaviourPrototype() 
 *
 * Description : Returns the number of plugins in this DLL
 *		
 * Paramters :
 *    CKBehaviorPrototype w ppProto
 *
 * Returns : CKERROR - Standard virtools return type
 *
 *******************************************************************
 */
CKERROR CGBLFileSystem::CreateBehaviourPrototype(CKBehaviorPrototype** ppProto)
{
	CKERROR err = CK_OK;

	// Call base class to create instance of CKBehaviorPrototype and
	// also declare the widget base inputs,  outputs and flags
	// Create the CKBehaviorPrototype object
	CKBehaviorPrototype *pProto = CreateCKBehaviorPrototype("GBLFileSystem");
	if (!pProto)
		return NULL;
	// Setup the behaviour inputs and outputs, do not change the order
	if (eBehInputOn != pProto->DeclareInput("On"))
		assert(NULL);
	if (eBehOutputDone != pProto->DeclareOutput("Done"))
		assert(NULL);
	if (eBehOutputError != pProto->DeclareOutput("Error"))
		assert(NULL);

	// Setup the parameter inputs and outputs, do not change the order
	if (eParamOutputErrorMsg != pProto->DeclareOutParameter("Error Message", CKPGUID_STRING))
		assert(NULL);
	if (eParamOutputScannedFolder != pProto->DeclareOutParameter("Scanned Folder", CKPGUID_STRING))
		assert(NULL);
	if (eParamInputMode != pProto->DeclareInParameter("Mode", CKGUID_GBLFILESYSTEMBROWSEMODE))
		assert(NULL);
	if (eParamInputCurrentFolder != pProto->DeclareInParameter("Current Folder", CKPGUID_STRING))
		assert(NULL);
	if (eParamInputDataArray != pProto->DeclareInParameter("Data Array", CKPGUID_DATAARRAY))
		assert(NULL);
	if (eParamInputFilter != pProto->DeclareInParameter("Filter", CKPGUID_STRING))
		assert(NULL);

	// flags
	pProto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);

	// Set the behaviour function
	pProto->SetFunction(BehaviourFunction);

	// Everything must have gone OK, pass back Proto pointer to Virtools
	*ppProto = pProto;
	return err;
}
示例#21
0
/*
 *******************************************************************
 * Function: int CreateBehaviourPrototype() 
 *
 * Description : Returns the number of plugins in this DLL
 *		
 * Paramters :
 *    CKBehaviorPrototype w ppProto
 *
 * Returns : CKERROR - Standard virtools return type
 *
 *******************************************************************
 */
CKERROR CGBLLOStringBuilder::CreateBehaviourPrototype(CKBehaviorPrototype** ppProto)
{
	CKERROR err = CK_OK;

	// Call base class to create instance of CKBehaviorPrototype and
	// also declare the widget base inputs,  outputs and flags
	// Create the CKBehaviorPrototype object
	CKBehaviorPrototype *pProto = CreateCKBehaviorPrototype("GBLStringBuilder");
	if (!pProto)
		return NULL;
	// Setup the behaviour inputs and outputs, do not change the order
	if (eBehInputOn != pProto->DeclareInput("On"))
		assert(NULL);
	if (eBehOutputDone != pProto->DeclareOutput("Done"))
		assert(NULL);
	if (eBehOutputError != pProto->DeclareOutput("Error"))
		assert(NULL);

	// Setup the parameter inputs and outputs, do not change the order
	if (eParamGetError != pProto->DeclareOutParameter("Error", GUID_TGBLERROR))
		assert(NULL);
	if (eParamGetNewText != pProto->DeclareOutParameter("New Text", CKPGUID_STRING))
		assert(NULL);
	if (eParamGetCarretPosition != pProto->DeclareOutParameter("Carret Position", CKPGUID_INT))
		assert(NULL);
	if (eParamSetSourceString != pProto->DeclareInParameter("Source String", CKPGUID_STRING))
		assert(NULL);
	if (eParamSetInsertPosition != pProto->DeclareInParameter("Insert Position", CKPGUID_INT))
		assert(NULL);
	if (eParamSetInsertString != pProto->DeclareInParameter("Insert String", CKPGUID_STRING))
		assert(NULL);
	
	// flags
	pProto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);

	// Set the behaviour function
	pProto->SetFunction(BehaviourFunction);

	// Everything must have gone OK, pass back Proto pointer to Virtools
	*ppProto = pProto;
	return err;
}
示例#22
0
//************************************
// Method:    CreatePClothDetachFromShapeProto
// FullName:  CreatePClothDetachFromShapeProto
// Access:    public 
// Returns:   CKERROR
// Qualifier:
// Parameter: CKBehaviorPrototype **pproto
//************************************
CKERROR CreatePClothDetachFromShapeProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("PClothDetachFromShape");
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("In");
	proto->DeclareOutput("Out");

	/*! \page PClothDetachFromShape  

	PClothDetachFromShape is categorized in \ref Clothes

	<h3>Description</h3>
	Apply to a <A HREF="Documentation.chm::/beobjects/1_ck3dentity.html">3DEntity</A><br>
	Detaches the cloth from a shape it has been attached to before<br>

	@see pCloth::detachFromShape()

	<h3>Technical Information</h3>

	\image html PClothDetachFromShape.png

	<SPAN CLASS="in">In: </SPAN>triggers the process
	<BR>
	<SPAN CLASS="out">Out: </SPAN>is activated when the process is completed.
	<BR>
	<BR>
	
	
	<SPAN CLASS="pin">Target: </SPAN>Target cloth reference.
	<BR>
	<BR>

	<SPAN CLASS="pin">Shape Reference: </SPAN>Shape to which the cloth should be attached to.

	
	<BR>
	<BR>

	<SPAN CLASS="pin">Attachment Flags: </SPAN>One or two way interaction, tearable or non-tearable
	*/

	proto->SetBehaviorCallbackFct( PClothDetachFromShapeCB );
	proto->DeclareInParameter("Shape Reference",CKPGUID_3DENTITY);


	
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetBehaviorFlags(CKBEHAVIOR_TARGETABLE);
	
	proto->SetFunction(PClothDetachFromShape);
	*pproto = proto;
	return CK_OK;
}
示例#23
0
/*
 *******************************************************************
 * Function: CKERROR CreateGBLCIGetCIS_IDListProto( 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 CreateGBLCIGetCIS_IDListProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype(GBL_CI_API_ENTRY("GetCIS_IDList"));
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("Start");
	proto->DeclareOutput("Success");
	proto->DeclareOutput("Error");

	proto->DeclareInParameter("Learning Application ID", GUID_TGBLLAID,"0");
	proto->DeclareInParameter("Result Array", CKPGUID_DATAARRAY);
    
	proto->DeclareOutParameter("GetErrorCode", GUID_TGBLERROR);
    
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);

	proto->SetFunction(GBLCIGetCIS_IDList);
	*pproto = proto;
	return CK_OK;
}
/*
 *******************************************************************
 * 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 CGBLDecodeAndDistribute::CreateProto(CKBehaviorPrototype** pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("GBLFCDecodeAndDistribute");
	if (!proto) 
    {
		return CKERR_OUTOFMEMORY;
	}

//---     Inputs declaration

    /**
	 * Start decoding the received string containing the target  GBLWaitForCommand
	 * block ID and command parameters and send it locally to the target
	 * GBLWaitForCommand BB.
	 */
	proto->DeclareInput("Decode");

//---     Outputs declaration

    /**
	 * The operation was successful, the command has been sent correctly.
	 */
	proto->DeclareOutput("OperationSuccessful");

    /**
	 * Activates when an error occurred during the execution of the BB (the type of
	 * error is given by the GetError parameter output).
	 */
	proto->DeclareOutput("Error");

//---     Input Parameters declaration

    /**
	 * Defines the string in which the command is encoded.
	 */
	proto->DeclareInParameter("CommandString", CKPGUID_STRING);

//---     Output Parameters declaration
    /**
	 * Parameter output that returns the description for an error that occurred.
	 */
	proto->DeclareOutParameter("Error", GUID_TGBLERROR);

//----	Local Parameters Declaration

//----	Settings Declaration
	proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)(CKBEHAVIOR_MESSAGESENDER));
	proto->SetBehaviorCallbackFct(CGBLDecodeAndDistribute::CallBack, NULL, NULL);
	proto->SetFunction(CGBLDecodeAndDistribute::BehaviourFunction);

	*pproto = proto;
	return CK_OK;
}
示例#25
0
//************************************
// 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;
}
示例#26
0
//************************************
// 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;
}
示例#27
0
CKERROR CreateDOUserValueModifiedProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("DOUserValueModified");
	if(!proto) return CKERR_OUTOFMEMORY;

	proto->DeclareInput("In");
	proto->DeclareInput("Off");
	proto->DeclareInput("Next Value");



	proto->DeclareOutput("Exit In");
	proto->DeclareOutput("Exit Off");
	proto->DeclareOutput("New Value");
	proto->DeclareOutput("Error");


	
	proto->DeclareInParameter("Connection ID", CKPGUID_INT, "0");
	proto->DeclareInParameter("Object", CKPGUID_BEOBJECT, "test");
	
	proto->DeclareOutParameter("Time", CKPGUID_TIME, "0");
	proto->DeclareOutParameter("Value", CKPGUID_STRING, "No Error");
	proto->DeclareOutParameter("Error", VTE_NETWORK_ERROR, "Ok");

	proto->DeclareSetting("Class", CKPGUID_STRING, "My3DClass");
	proto->DeclareSetting("Parameter Name", CKPGUID_STRING, "test");

	
	
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetBehaviorFlags((CK_BEHAVIOR_FLAGS)( CKBEHAVIOR_VARIABLEPARAMETEROUTPUTS  ));
	proto->SetFunction(DOUserValueModified);
	proto->SetBehaviorCallbackFct(DOUserValueModifiedCB);

	*pproto = proto;
	return CK_OK;

}
示例#28
0
CKERROR CreateAddNodalLinkProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = NULL;
	proto = CreateCKBehaviorPrototype("Create Nodal Edge");
	if(!proto) return CKERR_OUTOFMEMORY;
	
	proto->DeclareInput("In");
	proto->DeclareOutput("Out");

	proto->DeclareInParameter("Nodal Path",CKPGUID_GROUP);
	proto->DeclareInParameter("Start Node",CKPGUID_3DENTITY);
	proto->DeclareInParameter("End Node",CKPGUID_3DENTITY);
	proto->DeclareInParameter("Difficult",CKPGUID_FLOAT);


	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetFunction( AddNodalLink );
	
	*pproto = proto;
	return CK_OK;
	
}
示例#29
0
/*
*******************************************************************
* Function: 
*
* Description: 
*    
* Parameters: 
*
* Returns: 
*
*******************************************************************
*/
CKERROR CreateNSRemoveUserProto(CKBehaviorPrototype **pproto)
{
	CKBehaviorPrototype *proto = CreateCKBehaviorPrototype("NSRemoveUser");
	if(!proto) return CKERR_OUTOFMEMORY;



	proto->DeclareInput("In");
	
	proto->DeclareOutput("Removed");
	proto->DeclareOutput("Error");

	proto->DeclareInParameter("Connection ID", CKPGUID_INT, "0");
	proto->DeclareInParameter("User ID", CKPGUID_INT, "0");
	proto->DeclareOutParameter("Error", VTE_NETWORK_ERROR, "Ok");
	proto->SetFlags(CK_BEHAVIORPROTOTYPE_NORMAL);
	proto->SetFunction(NSRemoveUser);
	proto->SetBehaviorCallbackFct(NSRemoveUserCB);

	*pproto = proto;
	return CK_OK;

}
示例#30
0
CKERROR GBLCOCreateError::CreatePrototype( CKBehaviorPrototype** behaviorPrototypePtr )
	{

#if GBL_RUNTIME	
	// Not editable from Virtools Dev
	CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototypeRunTime( "GBLCOCreateError" );
#elif GBL_GAMEDEVELOPER 
	// Edition depend on the BB.
	CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCOCreateError" );
#else					
	// Editable from Virtools Dev
	CKBehaviorPrototype *behaviorPrototype = CreateCKBehaviorPrototype( "GBLCOCreateError" );
#endif 
	
	if ( !behaviorPrototype ) 
        return CKERR_OUTOFMEMORY;

	//---     Inputs declaration
	behaviorPrototype->DeclareInput( "In" );

	//---     Outputs declaration
	behaviorPrototype->DeclareOutput( "OutHandled" );
	behaviorPrototype->DeclareOutput( "OutUnhandled" );

	//---     Parameter Input declaration
	behaviorPrototype->DeclareInParameter("SetErrorCode", CKPGUID_INT);
	behaviorPrototype->DeclareInParameter("SetErrorDescription", CKPGUID_STRING);
	behaviorPrototype->DeclareInParameter("SetErrorType", GUID_EGBLERRORTYPE);
	
	//---     Parameter Output declaration
	behaviorPrototype->DeclareOutParameter("GetError", GUID_TGBLERROR);

	behaviorPrototype->SetFunction(GBLCOCreateError::BehaviourFunction);

    *behaviorPrototypePtr = behaviorPrototype;
    return CK_OK;
}