From: "Grein, Christoph" <christoph.grein@eurocopter.com>
Subject: Re: Renames: use of it....
Date: Tue, 26 Nov 2002 12:21:38 +0100 (MET)
Date: 2002-11-26T12:21:38+01:00 [thread overview]
Message-ID: <mailman.1038310142.28897.comp.lang.ada@ada.eu.org> (raw)
> Hi all,
> I am doing a code review for a one of the module in flight management
> computer.
> One the procedure is calling an another procedure
> (COMMANDS.EXECUTE_SCROLL) from a package called COMMANDS.
> In package COMMANDS the declaration of the procedure EXECUTE_SCROLL is
> as follows :
> procedure EXECUTE_SCROLL (MCDU_ID : in
> MMI_APPLICATION_TYPES.T_MCDU_ID;
> DIRECTION : in CONTEXT_TYPES.T_DIRECTION)
> renames ACTION_CONTROLER.EXECUTE_SCROLL;
>
> All the procedures in this package is rename of a procedure in package
> ACTION_CONTROLER or some other package. Why is it so?Why can't use the
> procedure from the package ACTION_CONTROLER itself(i.e instead of
> calling COMMANDS.EXECUTE_SCROLL why can't they use
> ACTION_CONTROLER.EXECUTE_SCROLL)?Is the package COMMANDS really
> required?
This looks very much like a design issue, probably Ada 83. I presume
ACTION_CONTROLER has more operations than EXECUTE_SCROLL, but only those made
visible in COMMANDS via renaming statements shall be visible to the outside. So
there is probably a coding guideline that clients shall use COMMANDS only and
not ACTION_CONTROLER directly.
This is work-around for the (in Ada 83) missing feature of private children.
Also in Ada 95, sometimes you cannot make everything private as you would like
to, so such a rule helps to limit visibility.
In our project, we use a lot of such renaming packages.
next reply other threads:[~2002-11-26 11:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-26 11:21 Grein, Christoph [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-26 10:37 Renames: use of it prashna
2002-11-26 12:57 ` Marin David Condic
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox