-
Notifications
You must be signed in to change notification settings - Fork 649
Description
The fact manager consists of a set of sub-managers for each specific fact (e.g. there is a DataSynonymAndIdEquationFacts class that handles DataSynonym facts, IrrelevantValueFacts class that handles PointeeValueIsIrrelevant and IdIsIrrelevant facts etc.)
It is sometimes useful to make queries about some facts from sub-managers of different facts (e.g. DataSynonym might want to assert that neither of two synonymous data descriptors contains an irrelevant id by querying IrrelevantValueFacts class).
However, we can't do that with the current design of the fact manager - neither of the sub-managers has a reference to either the parent fact manager or other sub-managers. A simple solution is to pass a pointer (or a reference) to the parent fact manager to all its components. This approach might not be the best one in terms of readability, though. The other approach is to flatten all methods from the fact manager's components into the manager itself.