Re: Comments on Application IDL

Jayakumar Muthukumarasamy ([email protected])
Mon, 19 Dec 1994 10:01:01 -0500 (EST)

>
> NEW ISSUE.
>
> The access methods for iinterface need parameters to spacify whether you want
> to get back the inherited attributes too.
>
> Say you have the following interfaces:
>
> interface A {
> attribute int x;
> void m (in int p);
> };
>
> interface B : A {
> attribute int y;
> void n (in int p);
> };
>
> Suppose that iinterface has a method called attr_iter that returns an iterator
> to iterate over all attributes of an interface. attr_iter should have the
> following signature:
>
> IAttr_Iter attr_iter (in bool inherit, in int num_levels);
>
> So, say b is a pointer to the iinterface for B:
>
> IAttr_Iter iter = b-> attr_iter (FALSE, 0)
> // the iterator would produce an iattr for x.
>
> IAttr_Iter iter = b-> attr_iter (TRUE, 1)
> // the iterator would produce iattr for both x an y.
>
> I am not sure if it is necessary to have the num_levels parameter. Also, I am
> not sure whether bool shoould be spelled differently. However, we need some
> way to allow clients to ask for the inherited stuff.
>
>
>

I don't see why we would need the num_levels parameters too. We
could probably have just two iterators, one which gets all attributes,
including inherited attributes, and once which gets only the local
attributes. Does this sound reasonable? Also, when someone tries to
delete inherited attributes, we could do the checking iff the call is
made through the interface. This is a very good example, of why iterators
are better.

-jk

-jk