Re: [Libxmlplusplus-general] coding style issues



On Fri, 2003-01-31 at 17:13, Stefan Seefeld wrote:
> 3) hiding state in the private section:
>     It's a matter of good encapsulation to put all members into the
>     private section, and then provide accessors (either public or
>     protected). That helps to decouple dependencies between base and
>     derived classes. Of course, derived classes then can't access the
>     member variable. That's exactly the point, that's the goal !

And I say "you can't predict the future" so you should not completely hide complex types.

For instance, in gtkmm, every class has a gobj() accessor so people can get at the underlying C 
instance if we haven't wrapped something. This will be the same in libxml++ - if people need to
use a libxml function that isn't wrapped in libxml++ then they will need access to the pointer to
the underlying C struct. I intend to add cobj() accessors if we apply your patch. 






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]