Ben Webb wrote:
You can always create a new decorator class which extends the existing one and wraps the return.It just passes some (unknown) information back (we could just pass backSure - I just think you're going to have a lot of trouble forcing all of the necessary information into this bond decorator. In the cubic spline case, that means a vector of floats, for example.
That said, I think I want to eventually move the identities of the bonded particles out of the the BondDecorator particle. Once I have done that, there is not any general information in the particle and so the BondDecorator should probably become something more specific. So returning a Particle* now seems like a better idea.