comp.lang.ada
 help / color / mirror / Atom feed
* Extend Record in Spec and Body
@ 2006-10-16 15:30 richard.charts
  2006-10-16 16:53 ` Jean-Pierre Rosen
  2006-10-17  7:30 ` Dmitry A. Kazakov
  0 siblings, 2 replies; 8+ messages in thread
From: richard.charts @ 2006-10-16 15:30 UTC (permalink / raw)


Is it possible to extend a record twice in a package?
I'm building a component now that will be mostly reusable.  There are a
couple packages that are the same, but for one piece the differences
require different code.  However, with the way it is designed, it seems
I could make the package specs the same and only alter the bodies.
I would like to try to hide part of the extended record from the
specification without having to change  the operation declarations.

I included a small slice of what I'm trying to do.  Is this even
possible?
Thanks.

SPEC:

private
    type Object is new HigherPackage.object
    with record
        Repo_View   : Repo_View_Array;
    end record;

end spec;

body
    type Object is new HigherPackage.object  -- This is where I'm not
sure how to proceed
    with record
        Data: Data_Array;
        Ack: boolean;
    end record;




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-10-17 20:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-16 15:30 Extend Record in Spec and Body richard.charts
2006-10-16 16:53 ` Jean-Pierre Rosen
2006-10-16 17:20   ` Richard Charts
2006-10-17  0:33     ` Georg Bauhaus
2006-10-17  1:11     ` Randy Brukardt
2006-10-17  7:30 ` Dmitry A. Kazakov
2006-10-17 18:49   ` Simon Wright
2006-10-17 20:19     ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox