/*---------------------------------------------------------------------------------------------------
** Constructors
*/
LinearSpaceAdaptor* LinearSpaceAdaptor_New( Name name, AbstractContext* context ) {
  /* Variables set in this function */
  SizeT                                              _sizeOfSelf = sizeof(LinearSpaceAdaptor);
  Type                                                      type = LinearSpaceAdaptor_Type;
  Stg_Class_DeleteFunction*                              _delete = _LinearSpaceAdaptor_Delete;
  Stg_Class_PrintFunction*                                _print = _LinearSpaceAdaptor_Print;
  Stg_Class_CopyFunction*                                  _copy = NULL;
  Stg_Component_DefaultConstructorFunction*  _defaultConstructor = (void* (*)(Name))_LinearSpaceAdaptor_New;
  Stg_Component_ConstructFunction*                    _construct = _LinearSpaceAdaptor_AssignFromXML;
  Stg_Component_BuildFunction*                            _build = _LinearSpaceAdaptor_Build;
  Stg_Component_InitialiseFunction*                  _initialise = _LinearSpaceAdaptor_Initialise;
  Stg_Component_ExecuteFunction*                        _execute = _LinearSpaceAdaptor_Execute;
  Stg_Component_DestroyFunction*                        _destroy = _LinearSpaceAdaptor_Destroy;
  AllocationType                              nameAllocationType = NON_GLOBAL;
  MeshGenerator_SetDimSizeFunc*                   setDimSizeFunc = _MeshGenerator_SetDimSize;
  MeshGenerator_GenerateFunc*                       generateFunc = LinearSpaceAdaptor_Generate;

  LinearSpaceAdaptor* self = _LinearSpaceAdaptor_New(  LINEARSPACEADAPTOR_PASSARGS  );

  _MeshGenerator_Init( (MeshGenerator*)self, context );
  _MeshAdaptor_Init( (MeshAdaptor*)self );
  _LinearSpaceAdaptor_Init( self );

  return self;
}
Exemple #2
0
MeshGenerator* _MeshGenerator_New( MESHGENERATOR_DEFARGS ) {
	MeshGenerator* self;
	
	/* Allocate memory */
	assert( sizeOfSelf >= sizeof(MeshGenerator) );
	self = (MeshGenerator*)_Stg_Component_New( STG_COMPONENT_PASSARGS );

	/* Virtual info */
	self->generateFunc = generateFunc;

	/* MeshGenerator info */
	_MeshGenerator_Init( self );

	return self;
}
C0SphericalGenerator* C0SphericalGenerator_New( Name name, AbstractContext* context ) {
	/* Variables set in this function */
	SizeT                                              _sizeOfSelf = sizeof(C0SphericalGenerator);
	Type                                                      type = C0SphericalGenerator_Type;
	Stg_Class_DeleteFunction*                              _delete = _C0Generator_Delete;
	Stg_Class_PrintFunction*                                _print = _C0Generator_Print;
	Stg_Class_CopyFunction*                                  _copy = NULL;
	Stg_Component_DefaultConstructorFunction*  _defaultConstructor = (void* (*)(Name))_C0Generator_New;
	Stg_Component_ConstructFunction*                    _construct = _C0Generator_AssignFromXML;
	Stg_Component_BuildFunction*                            _build = _C0Generator_Build;
	Stg_Component_InitialiseFunction*                  _initialise = _C0Generator_Initialise;
	Stg_Component_ExecuteFunction*                        _execute = _C0Generator_Execute;
	Stg_Component_DestroyFunction*                        _destroy = NULL;
	AllocationType                              nameAllocationType = NON_GLOBAL;
	MeshGenerator_SetDimSizeFunc*                   setDimSizeFunc = _MeshGenerator_SetDimSize;
	MeshGenerator_GenerateFunc*                       generateFunc = (MeshGenerator_GenerateFunc*)C0SphericalGenerator_Generate;

	C0SphericalGenerator* self = (C0SphericalGenerator*)_C0Generator_New(  C0GENERATOR_PASSARGS  );
   
   _MeshGenerator_Init( (MeshGenerator*)self, context );
	_C0Generator_Init( (C0Generator*)self );

   return self;
}