comp.lang.ada
 help / color / mirror / Atom feed
From: "Anthony E. Glover" <aeg@hiwaay.net>
Subject: Design Question: How Best To Structure Cross-Referencing Types In Ada 95
Date: 1999/01/20
Date: 1999-01-20T00:00:00+00:00	[thread overview]
Message-ID: <36A68FCA.E1EEAFFE@hiwaay.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

Just recently switched our development environment to Ada95 and have
come across a problem that may lend itself to some new Ada95 capability.
I have some new code that has private types that reference each other.
In Ada83 I have something that looks like:

package XYZ is
  type Part is private;
  type Car is private;
  procedure Install( On_Car   : Car;
                     The_Part : Part );
  procedure Activate( The_Part : Part );
private
  type Part is
    record
      Parent_Car : Car;
    end record;
  type Car is
    record
      Part1 : Part;
      Part2 : Part;
    end record;
end XYZ;

Since both types and some of the subprograms reference each other, I
have to  
put them both in the same package.  It turns out that I have about 5
types that
behave like this and I end up with one large package.  I would rather
have the
types split into different packages, but I would get circular
dependencies when
compiling the specs.

Is there a neat Ada95 way of getting around this cross-referencing
problem?

Tony
aeg@hiwaay.net
glover@thaad.tecmasters.com

  



-- 
Tony Glover
ELMCO, Inc.
(256)721-6317
aeg@hiwaay.net

[-- Attachment #2: Card for Anthony E. Glover --]
[-- Type: text/x-vcard, Size: 274 bytes --]

begin:          vcard
fn:             Anthony E. Glover
n:              Glover;Anthony E.
org:            ELMCO, Inc.
email;internet: aeg@hiwaay.net
title:          Senior Software Engineer
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


             reply	other threads:[~1999-01-20  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-20  0:00 Anthony E. Glover [this message]
1999-01-21  0:00 ` Design Question: How Best To Structure Cross-Referencing Types In Ada 95 dewar
1999-01-21  0:00   ` Brian Rogoff
1999-01-26  0:00   ` Dale Stanbrough
1999-01-21  0:00 ` dennison
1999-01-21  0:00 ` Matthew Heaney
1999-01-30  0:00   ` Nick Roberts
1999-01-31  0:00     ` Matthew Heaney
1999-01-22  0:00 ` Steve Whalen
1999-01-22  0:00   ` dennison
replies disabled

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