Hi Usman,
- What I understood from the earlier discussion: we do generate
Inheritance definitions for framework classes/system classes that are referenced by user defined classes. My questions is that what does their inheritance definition look like. In the simplest case, the inheritance definition for a system class may look like this (my assumption: we discard the belongsTo attribute):
FAMIX.Class { id: 121 name: 'FrameworkClass' stub: true }
I do not understand this question.
- What about the inheritance definition of user definied classes
that do not have any children. How do we assign their subclass attribute. I have tried the following by putting stub: true
(FAMIX.InheritanceDefinition (id: 18) (stub true) (subclass 0) (superclass 5) ) But it didn't work.
There are several reasons why it did not work.
First, the inheritance definition is between 2 ***existent*** classes, not between a class and its non existent children. So, in this case, because an entity with id = 0 does not exist you would get an error when loading the file.
Second, it also would not work because whenever you make a reference to an entity via an id, you have to use (idref: xxx). Thus, an inheritance definition would look like: (FAMIX.InheritanceDefinition (id: ZZZ) (subclass (idref: XXX)) (superclass (idref: YYY)) )
Furthermore, we usually do not mark stub the relationships, but we mark as stub only the structural entities. Thus, if the superclass is stub, we know the inheritance points to an outside class.
I attached here the corrected file.
For a more detailed example of a valid MSE file, please take a look at: http://smallwiki.unibe.ch/moose/lansamplemodel/?action=MimeView
I generate a file keeping the above defined hypotheses: minimal root definition and subclass=0 definition for classes having no children but the file fails to load in MOOSE. I am attached the file with this mail, just in case. The program defines a simple inheritance hierarchy with only one method. The inheritance hierarchy looks like this:
shape <- rectangle,circle,trapezoid rectangle <- square,rectangle1 Circle <- Eclipse
For this problem, I would greatly appreciate your help coz IMHO the documentation found on the Web provides several interpretations and can be a misleading.
thanx in advance,
Usman
-- Tudor Girba www.iam.unibe.ch/~girba www.iam.unibe.ch/~girba/blog/
"The coherence of a trip is given by the clearness of the goal."