C++ design question
Forget encapsulation.
(On modern projects, a given binary only grows so large before we use a pipe
or COM to plug it into a bigger app, so that's the encapsulation boundary.)
Focus on removing duplication.
If two clients do similar things to a vector of doubles, refactor them until
their code looks similar.
Then, replace the two similar procedures with a call to a new function,
containing those common lines.
The simplest place to put that common function is inside a class that also
contains TS.
Voila: Objects.
--
Phlip
http://www.c2.com/cgi/wiki?TestFirstUserInterfaces
|