コード例 #1
0
Index LiveComponentRegister_Add( LiveComponentRegister *self, Stg_Component *component ) {
   assert( self );
   // check if component is already there. If so don't append to objectList
   if( Stg_ObjectList_Get( self->componentList, component->name ) ) {
      Index id = Stg_ObjectList_GetIndex( self->componentList, component->name );
      // lets just silence this for now
      return id;
   }
   return Stg_ObjectList_Append( self->componentList, component );
}
コード例 #2
0
Index LiveComponentRegister_Add( LiveComponentRegister *self, Stg_Component *component ) {
   assert( self );
   // check if component is already there. If so don't append to objectList
   if( Stg_ObjectList_Get( self->componentList, component->name ) ) {
      Index id = Stg_ObjectList_GetIndex( self->componentList, component->name );
      // lets just silence this for now
      //Journal_Printf( global_error_stream, "### Trying to add component '%s'. But it already exist on the LiveComponentRegister at index %d\n", component->name, id );
      return id;
   }
   return Stg_ObjectList_Append( self->componentList, component );
}
コード例 #3
0
void TimeIntegrator_InsertAfterFinishEP( 
	void* timeIntegrator, 
	Name hookToInsertAfter, 
	Name name, 
	Func_Ptr funcPtr, 
	char* addedBy, 
	void* data ) 
{
	TimeIntegrator*        self            = (TimeIntegrator*)timeIntegrator;

	if ( Stg_ObjectList_GetIndex( self->finishEP->hooks, hookToInsertAfter ) != (unsigned int)-1 ) {
		EntryPoint_InsertAfter( self->finishEP, hookToInsertAfter, name, funcPtr, addedBy );
		Stg_ObjectList_InsertAtIndex(
				self->finishData,
				Stg_ObjectList_GetIndex( self->finishEP->hooks, name ),
				data );
	}
	else {
		TimeIntegrator_AppendFinishEP( self, name, funcPtr, addedBy, data );
	}
}