Help is needed...
I have 3 classes, a manager that contains 2 pointers. One for class A the other for class B. A does not know about B and vice versa.
A does some calculations, and at the end it puts 3 floats on the clipboard. Then B pulls 3 floats from the clipboard and performs its own calculations. This cycle is managed by the manager and is repeated many times (iteration after iteration).
My problem: Now class A creates a floating-point vector that needs class B. This vector can have more than 1000 values, and I don’t want to use the clipboard to transfer it to B, because it will become a consumer of time, even a bottleneck, because it behavior is repeated step by step.
A simple solution is that B will know A (set the pointer to A). Another is the transfer of the vector pointer through the Manager. But I'm looking for something else, more oriented to the object, which will not break the existing separation between A and B
Any ideas?
Many thanks
David
source share