Esempio n. 1
0
Remesher* _Remesher_New( CLASS_ARGS, 
			 COMPONENT_ARGS, 
			 REMESHER_ARGS )
{
	Remesher*	self;

	/* Allocate memory. */
	self = (Remesher*)_Stg_Component_New( _sizeOfSelf,
					    type,
					    _delete,
					    _print, 
					    _copy, 
					    _defaultConstructor, 
					    _construct, 
					    _build, 
					    _initialise, 
					    _execute, 
					    _destroy, 
					    name, 
					    initFlag );

	/* Virtual functions. */
	self->setMeshFunc = setMeshFunc;

	/* Remesher info */
	if( initFlag ) {
		_Remesher_Init( self );
	}

	return self;
}
Esempio n. 2
0
void _Remesher_AssignFromXML( void* remesher, Stg_ComponentFactory* cf, void* data ) {
    Remesher*			self = (Remesher*)remesher;
    AbstractContext*	context;
    Mesh*					mesh;

    assert( self );
    assert( cf );
    assert( cf->componentDict );

    context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data );
    if( !context  )
        context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data  );

    mesh = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"mesh", Mesh, True, data  );

    _Remesher_Init ( self, context, mesh );
}