comp.lang.ada
 help / color / mirror / Atom feed
* Suggestions needed to split a package
@ 2019-05-24 15:49 A. Cervetti
  2019-05-24 16:14 ` Björn Lundin
  0 siblings, 1 reply; 4+ messages in thread
From: A. Cervetti @ 2019-05-24 15:49 UTC (permalink / raw)


A package in the program I am writing is getting too long.
So I thought it would be a good idea to split it.

The package is here: https://github.com/andreacervetti/ada-virt-monitor/tree/master/avm/src/monitor (files monitor-structures.ad*).

My problems are:
I'd like to avoid forcing clients of the package to "with" too many modules.
I want keep private types private.
Subroutines in the current package see all the private types and operate directly on record fields and build objects using extension aggregates.
One of the record types contain a vector of the other.

Being private types simply splitting the file and using "limited with" clause  would not be possible, because there would be no visibility of the private part.
I thought to define the types as abstract in the parent package and then derive non-abstract types in children.
Would it be feasible?
I don't know how big would be the impact on current code. 
To further complicate things there is a child module that operates on structure built in the package.

Before embarking on a huge job of modifying the current code I need some suggestions.
Does it make sense what I am planning or would it be better leave thing as they are?

Thanks in advance

A. Cervetti


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

end of thread, other threads:[~2019-05-24 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 15:49 Suggestions needed to split a package A. Cervetti
2019-05-24 16:14 ` Björn Lundin
2019-05-24 20:26   ` Randy Brukardt
2019-05-24 21:21     ` Shark8

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