Hello,
we are still working on an ecore file importer in Moose and we have some questions concerning the code generation.
When the BasicCodeGenerator generates a class that inherits from nothing, its super class is by default Core.Object.
However, I believe that the superclass may depend on the type of the model we want to load. Indeed, if you load a model, or a meta model, or a meta meta model, the superclass can be different
Do you think that SCG.Moose.CallingInitializeObject or SCG.Moose.MooseElement could be sometimes good candidates for the superclass instead of Core.Object ?
Thank you for your help.
Sara
You are right.
To use your elements in Moose, the superclass must be MooseElement! Moose can not work with any element, only with subclasses of MooseElement. I suggest to subclass BasicCodeGenerator and generate Moose entities there. Also for Moose entities, there is additional meta description such as navigation axes, that you may want to generate.
Does this answer your question?
cheers, AA
On 13 Jun 2007, at 11:49 , sellossa@ensieta.fr wrote:
Hello,
we are still working on an ecore file importer in Moose and we have some questions concerning the code generation.
When the BasicCodeGenerator generates a class that inherits from nothing, its super class is by default Core.Object.
However, I believe that the superclass may depend on the type of the model we want to load. Indeed, if you load a model, or a meta model, or a meta meta model, the superclass can be different
Do you think that SCG.Moose.CallingInitializeObject or SCG.Moose.MooseElement could be sometimes good candidates for the superclass instead of Core.Object ?
Thank you for your help.
Sara
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev