c++ - Is this an appropriate use of class friendship? -
when creating windows parent , child dialog classes, idea make child class friend of parent class access private data or should use accessor functions?
the need friend rare - it's when need reimplement deep behaviour in 1 class without either rewriting both inherit single base or without providing lots of asccessors.
only time have needed rewrite opengl based renderer in activex - when needed @ lot of low level model data, couldn't (for non-technical reasons) reimplement common abc.
Comments
Post a Comment