Hi, I'm programming a class that handles a certain types of parameters. And also can save/load them from disk. Well for each parameter I have it's corresponding setter and getter method all similar to the following:
I also have implemented a method to set the value for all the parameters (like the setter above) all in just a simple call. Well my question is: what's the common way to implement this "global" setter: calling its setter for each parameter or putting directly the code of its corresponding setter for each parameter?Qt Code:
double ProcParamsHandler::sizeH() { return m_sizeh; } void ProcParamsHandler::setSizeH(double newSizeH) { if (newSizeH < 0 || newSizeH > MAX_SIZE_H) newSizeH = INVALID_SIZE; m_sizeH = newSizeH; }To copy to clipboard, switch view to plain text mode
Thanks.
Bookmarks