Re: mrl installation and syntax question

Kurt Stirewalt ([email protected])
Thu, 25 May 1995 12:58:38 -0400

>I re-read you original message, and noticed I hadn't answered all your
>questions. Ewald is on vacation, so nothing is happening with the object
>system.

No problem. I'll just do stuff on the MRL manual instead.

>I have two questions for you:
>- Can we use "class inheritance" in mrl definitions. For example:
>Object Color {
> };
>
>Object RGB_Color : Color {
> attribute red : Double;
> attribute green : Double;
> attribute blue : Double;
> is_like inherits (red,green,blue);
>};
>
>Object HSV_Color : Color {
> attribute hue : Double;
> attribute saturation : Double;
> attribute value : Double;
> is_like inherits (hue,saturation,value);
>};

Yes, you can do that. The mrl parser will act on it by essentially treating
HSV_Color and RGB_Color as if they had all of the attributes of Color inlined
into their definition. I hadn't thought of this before, but the mrl back end
should also somehow communicate this "subclassing" to the object system
so that it can do dynamic type checking correctly. Is there a facility for
doing this in the OS? Tell me the name of the call and I'll put it in.

>- In the documentation section, how do I document the object itself?
>
>You sent me the following example:
>
>Description Guide {
> attribute dir "The direction";
> attribute position "The position";
> attribute margin1 "The first margin";
> attribute margin2 "The second margin";
>};
>
>Can I document as follows? IE, add a string after the open brace?
>Description Guide {
> "A guide is something funny that people use"
> attribute dir "The direction";
> attribute position "The position";
> attribute margin1 "The first margin";
> attribute margin2 "The second margin";
>};

Currently the string would precede the open brace, but your example here looks
much nicer. Want it changed?

-- kurt.