Re: Question in mrl

Pedro Szekely ([email protected])
Fri, 07 Apr 1995 14:03:58 PDT

JK,

I was in the middle of typing this message when you called, and I just called
you again and couldn't find you, so I'll finish the message and try calling
you a bit later.
>
> Is it possible for me to declare an attribute of type Any in the
> mrl file? The object system should support this, for me to be able to do it.
> I need a facility like this for the application model. Otherwise, I will
> have to model what Any gives, myself. Thanks.
>

It is not possible in the current system to declare an attribute of type
MM_Any. The only types that you can declare are the members of the
MM_Type_Code enumeration:

typedef enum type_code {
MM_Type_None, MM_Type_Long, MM_Type_Float, MM_Type_Enum,
MM_Type_Object, MM_Type_Collection, MM_Type_Expression }
MM_Type_Code;

So, you cannot declare an attribute of type Any in the current system. We need
some extension.

I don't have a clear picture of what you need. Is the idea that in the model
you'll have an attribute called, say, XYZ, whose type is ANY. That means that
in the model you could have an object, say A1 and you want to be able to store
in the XYZ attribute either a Long, a Float, etc?

If this is so, I wonder if it is enough to add a new MM_Type_Code called
MM_Type_Any, which means that the value of an attribute can be any of the
legal types (MM_Type_Long, MM_Type_Float, MM_Type_Enum, MM_Type_Object,
MM_Type_Collection, MM_Type_Expression).

The main effect of this addition is to essentially turn all type checking off.

Pedro Szekely
USC/ISI, 4676 Admiralty Way, Marina del Rey, CA 90292
Phone: 310/822-1511, Fax: 310/823-6714
URL: http://www.isi.edu/isd/szekely.html