Inheriting structs



Hi Joerg,

        You say that UNO allows inheritance of structs; ie. if I have
something like this:

        struct a {
                long foo;
        };
  
        struct b : a {
                long baa;
        };
  
        And a method:
  
        void doKippersFloat (struct a);
  
        And I pass 'b' to it; then I assume that ( unless you marshal the
type information as well per struct - horribly wasteful ), that it is then
impossible to narrow a to type 'struct b' inside the doKippersFloat method
if we have passed a 'struct b'. If this is the case ( as seems only
obvious ), it would seem that CORBA ( at least ORBit ) has a similar
property; that of nested structs; so instead of inheriting explicitely you
might do:
  
        struct b {
                struct a;
                long   baa;
        };
  
        So this should be no problem to map, furthermore an exception is
extremely similar to a struct, so this shouldn't be an issue either.
  
        Regards,
  
                Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]