I have a large, self-contained environmental model. In the model I have a large class called cell
, that contains many (~100) vectors
and doubles
that all together dictate the current state of the cell
across many attributes. These attributes are changed by different environmental and biological processes (other classes
), which contain process specific functions/methods. I am tempted to make these all of these process classes (20+) friend classes of the cell
class, so that I don't have to write nearly 200 get/set functions.
It would also allow my code to be more simplistic and easier to read:
cell->variableA = (cell->variableA * someInput)/(somOtherInput)
vs.
cell->setVariableA(cell->getVariableA * someInput)/(someOtherInput)
Are there solid reasons against doing this? Should I also just consider making the data members all public?
The model is a self contained application - I don't share the code with others to use/couple anything to.