Fernando Cacciola wrote: > "Aleksey Gurtovoy" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > > David Abrahams wrote: > > > Here's an example I just cooked up of using the PP lib to solve a > > > classic C++ OO problem: repeated boilerplate in the definition of > > > Pimpl classes. > > > > There is another variation of the idiom, sometimes called "hidden state", > > which doesn't have the shortcoming in the first place: > > > A shortcoming of the hidden state idiom compared to the classic delegation > idiom is that only the state is encapsulated, not the behaviour.
I am not sure what do you mean by "encapsulated". Hidden in a source file as opposite to the header? > IOWs, if you need to hide the operations, not just the state, you still > need to mirror the interface class member functions into > the impl class. How so? With the hidden state, what would be private member functions becomes free functions at the file scope. You just call those directly from anywhere within the file scope, without the boilerplate forwarding. Aleksey _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost