/* Private Constructor: This will accept all the virtual functions for this class as arguments. */
RateFieldTimeIntegrator* _RateFieldTimeIntegrator_New(  RATEFIELDTIMEINTEGRATOR_DEFARGS  )
{
   RateFieldTimeIntegrator* self;

   /* Call private construCtor of parent - this will set virtual functions of parent and continue up the hierarchy tree. At the beginning of the tree it will allocate memory of the size of object and initialise all the memory to zero. */
   assert( _sizeOfSelf >= sizeof(RateFieldTimeIntegrator) );
   self = (RateFieldTimeIntegrator*) _TimeIntegrand_New(  TIMEINTEGRAND_PASSARGS  );

   return self;
}
Exemplo n.º 2
0
SwarmAdvector* _SwarmAdvector_New(  SWARMADVECTOR_DEFARGS  )
{
	SwarmAdvector* self;

	/* Allocate memory */
	assert( _sizeOfSelf >= sizeof(SwarmAdvector) );
	self = (SwarmAdvector*)_TimeIntegrand_New(  TIMEINTEGRAND_PASSARGS  );

	/* General info */

	/* Virtual Info */

	return self;
}
void* _TimeIntegrand_DefaultNew( Name name ) {
	/* Variables set in this function */
	SizeT                                               _sizeOfSelf = sizeof(TimeIntegrand);
	Type                                                       type = TimeIntegrand_Type;
	Stg_Class_DeleteFunction*                               _delete = _TimeIntegrand_Delete;
	Stg_Class_PrintFunction*                                 _print = _TimeIntegrand_Print;
	Stg_Class_CopyFunction*                                   _copy = _TimeIntegrand_Copy;
	Stg_Component_DefaultConstructorFunction*   _defaultConstructor = _TimeIntegrand_DefaultNew;
	Stg_Component_ConstructFunction*                     _construct = _TimeIntegrand_AssignFromXML;
	Stg_Component_BuildFunction*                             _build = _TimeIntegrand_Build;
	Stg_Component_InitialiseFunction*                   _initialise = _TimeIntegrand_Initialise;
	Stg_Component_ExecuteFunction*                         _execute = _TimeIntegrand_Execute;
	Stg_Component_DestroyFunction*                         _destroy = _TimeIntegrand_Destroy;
	TimeIntegrand_CalculateTimeDerivFunction*  _calculateTimeDeriv = _TimeIntegrand_AdvectionTimeDeriv;
	TimeIntegrand_IntermediateFunction*              _intermediate = _TimeIntegrand_Intermediate;

	/* Variables that are set to ZERO are variables that will be set either by the current _New function or another parent _New function further up the hierachy */
	AllocationType  nameAllocationType = NON_GLOBAL /* default value NON_GLOBAL */;

	return (void*) _TimeIntegrand_New(  TIMEINTEGRAND_PASSARGS  );
}