From: Eric B. <er...@go...> - 2008-03-02 06:34:30
|
Eric Bezault wrote: > Hi Jocelyn, > > Some of the modifications you made in geant don't compile with > ISE 5.7: > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Error code: VTCG > Error: actual generic parameter does not conform to constraint. > What to do: make sure that actual parameter is a type conforming to the > constraint (the type appearing after `->' for the corresponding formal). > > Class: GEANT_GROUP > Feature: invariant > In declaration: GEANT_TASK_BUILDER [GEANT_TASK] > > For type: GEANT_TASK_BUILDER [GEANT_TASK] > Argument number: 1: > Actual generic parameter: GEANT_TASK > Type to which it should conform: GEANT_TASK > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Can you implement it in some other way than using generic > constraint creation? I know that adding `make' as creation > procedure of GEANT_TASK would work, but I do believe that > GEANT_TASK should be declared as deferred anyway. > > As a matter of fact, I prefer the old way with the inspect > rather than relying on generic constraint creation to > implement a pseudo factory which is used in a single place > in a non-polymorphic way. One solution if you don't like inspect is to let GEANT_TASKs be factories of temselves. They could then be used in place of GEANT_TASK_BUILDER, and hence avoiding the problematic generic creation. It would work like `twin'. I'm not sure we can use `twin' directly because we expect `twin' to duplicate the data, whereas here we want them to be reset. But in that case there will be nothing to be reset if we use them properly (keep this set of task objects to create other task objects, but not to execute themselves as tasks). -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |