void _SwarmDump_Construct( void* swarmDump, Stg_ComponentFactory* cf, void* data ) { SwarmDump* self = (SwarmDump*)swarmDump; Swarm** swarmList; AbstractContext* context; Bool newFileEachTime; Index swarmCount; context = Stg_ComponentFactory_ConstructByName( cf, "context", AbstractContext, True, data ) ; swarmList = Stg_ComponentFactory_ConstructByList( cf, self->name, "Swarm", Stg_ComponentFactory_Unlimited, Swarm, True, &swarmCount, data ) ; newFileEachTime = Stg_ComponentFactory_GetBool( cf, self->name, "newFileEachTime", True ); _SwarmDump_Init( self, context, swarmList, swarmCount, newFileEachTime ); Memory_Free( swarmList ); }
void _UnionParticleLayout_Construct( void* unionParticleLayout, Stg_ComponentFactory *cf, void* data ) { UnionParticleLayout* self = (UnionParticleLayout*) unionParticleLayout; GlobalParticleLayout** particleLayoutList; Index particleLayoutCount; particleLayoutList = Stg_ComponentFactory_ConstructByList( cf, self->name, "ParticleLayoutList", Stg_ComponentFactory_Unlimited, GlobalParticleLayout, True, &particleLayoutCount, data ); _UnionParticleLayout_Init( self, particleLayoutList, particleLayoutCount ); }
void _lucViewport_AssignFromXML( void* viewport, Stg_ComponentFactory* cf, void* data ) { lucViewport* self = (lucViewport*) viewport; DrawingObject_Index drawingObjectCount; lucDrawingObject** drawingObjectList; lucCamera* camera; /* TODO Construct Parent */ self->context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", AbstractContext, False, data ); if ( !self->context ) self->context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", AbstractContext, True, data ); camera = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Camera", lucCamera, True, data ) ; drawingObjectList = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"DrawingObject", Stg_ComponentFactory_Unlimited, lucDrawingObject, True, &drawingObjectCount, data ); _lucViewport_Init( self, camera, drawingObjectList, drawingObjectCount, Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"title", ""), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"axis", False ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"axisLength", 0.2 ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"antialias", True ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"rulers", False ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"timestep", False ), Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"border", 0), Stg_ComponentFactory_GetString( cf, self->name, (Dictionary_Entry_Key)"borderColour", "#888888" ), Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"disable", False ), Stg_ComponentFactory_GetInt( cf, self->name, (Dictionary_Entry_Key)"margin", 32), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"nearClipPlane", 0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"farClipPlane", 0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"scaleX", 1.0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"scaleY", 1.0 ), Stg_ComponentFactory_GetDouble( cf, self->name, (Dictionary_Entry_Key)"scaleZ", 1.0 )); Memory_Free( drawingObjectList ); }
void _TimeIntegrand_AssignFromXML( void* timeIntegrand, Stg_ComponentFactory* cf, void* data ) { TimeIntegrand* self = (TimeIntegrand*)timeIntegrand; Index dataCount = 0; Stg_Component** initData = NULL; Variable* variable = NULL; TimeIntegrator* timeIntegrator = NULL; Bool allowFallbackToFirstOrder = False; DomainContext* context; context = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)"Context", DomainContext, False, data ); if( !self->context ) context = Stg_ComponentFactory_ConstructByName( cf, (Name)"context", DomainContext, False, data ); variable = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)Variable_Type, Variable, False, data ) ; timeIntegrator = Stg_ComponentFactory_ConstructByKey( cf, self->name, (Dictionary_Entry_Key)TimeIntegrator_Type, TimeIntegrator, True, data ) ; initData = Stg_ComponentFactory_ConstructByList( cf, self->name, (Dictionary_Entry_Key)"data", Stg_ComponentFactory_Unlimited, Stg_Component, False, &dataCount, data ); allowFallbackToFirstOrder = Stg_ComponentFactory_GetBool( cf, self->name, (Dictionary_Entry_Key)"allowFallbackToFirstOrder", False ); _TimeIntegrand_Init( self, context, timeIntegrator, variable, dataCount, initData, allowFallbackToFirstOrder ); if( initData != NULL ) Memory_Free( initData ); }