
On Wed, Feb 27, 2013 at 4:08 PM, Chris Stankevitz
Can you modify the attached program so that the object TCPositionTraits holds all the traits for the TCPosition object. Not just the traits for the "double" parameters, as is currently the case. Notably missing from TCPositionTraits is a reference to TCPosition::mSteps.
Attached is an example of how do do this. Drawback: the TCPositionTraits object now has a lot of typing in it. And if/when you create another object (e.g. TCEmployeeTraits) you are going to have to do a lot of typing again. There will be a lot of code duplication. The basic idea is to make TCPositionTraits::TSItem an abstract base class, then create implementations that handle the various types of position parameters. Chris