Domains, Facts, Properties, Classes sharing confusion ?
Posted: 27 Dec 2015 6:27
I currently have a working class called calcWindow that uses a few facts to hold info consulted from a physical fact file.
To try and improved the speed of this program I now wish to consult the facts then move these facts into a chainDB with a btree index. The chainDB and btIndex stuff I know how to do.
For many years I have never known how to share or inherit a fact declaration between two classes as I now wish to write a separate class that will from now on, handle my facts database but in a btree database.
Here is a current example
How and where do I declare this gift fact template/type so that I can use instances of this fact in both places. The existing calcWindow class and my new soon to be written btree class that will hold a btree database of the pool of gift. I still need to access this gift template/type in my existing calcWindow as I create small collections of gifts for optimisation purposes.
Or do I simply duplicate the declaration in both places and hope to remember to change both if the fact format changes.
To try and improved the speed of this program I now wish to consult the facts then move these facts into a chainDB with a btree index. The chainDB and btIndex stuff I know how to do.
For many years I have never known how to share or inherit a fact declaration between two classes as I now wish to write a separate class that will from now on, handle my facts database but in a btree database.
Here is a current example
Code: Select all
class facts
% ID Lat Log Weight Distance
gift:(integer,real,real,real, real).
Or do I simply duplicate the declaration in both places and hope to remember to change both if the fact format changes.