General Assignment and Mutator Helper Functions
In the constant quest for software quality, consistent interfaces and modular code are very important. In light of this, there is a need to turn attention on get and set. If you examine the current implementations of get or set, the logic in almost every case statement is different. These differences are currently necessary because the interface for each public variable is unique. It is preferable to keep the group-of-eight functions as uniform as possible and that means trying to move interface differences out of get and set. A helper-function technique is developed that pushes most of the differences out of get and set and into the helper. This technique will improve code modularity and improvements in modularity directly relate to improvements in code quality. As always, the driving force is code quality. As the public interface grows in complexity, it would be bad if the complexity of get and set grew faster than the interface.
General Assignment and Mutator Helper Functions, Page 1 of 2
< Previous page Next page > /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch16-1.gif /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch16-2.gif