ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: dynamic inheritance with FC++
by Larry Evans other posts by this author
Feb 28 2004 3:07AM messages near this date
RE: [boost] Proxy indirect container adaptor: 4 claims | Re: [boost] Re: dynamic inheritance with FC++
On 02/27/2004 04:52 PM, Brian McNamara wrote:
 > >On Thu, Feb 26, 2004 at 12:04:19PM -0600, Larry Evans wrote:
[snip]

 >  If class "C" wants to delegate method "f" to class B, then below is
 >  code to do it.  I used boost::{lambda,function} rather than FC++ in
 >  the example.  The basic idea is to get rid of member functions (a
 >  recurring motif) in favor of function objects.  Annoyingly, you have
 >  to pass a pointer-to-the-current-object as an extra argument, which
 >  I can't seem to get rid of right now.  (Ideas?)

[code snipped]

I'm having a hard time understanding what the code does except what
amounts to using function pointers (or boost::function objects)
instead of methods.  The code is dynamic because the function pointers
can be updated at any time.  Am I missing something?

I was wanting something more like section 12.7 of _Design&Evolution of
C++_.  At first, I guessed that maybe that's what you were doing, but
then I wondered why C inherits from B instead of C just contains a B*,
as in section 12.7.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Larry Evans
Brian McNamara
Larry Evans
Larry Evans
Larry Evans
Larry Evans
Brian McNamara
Larry Evans
Brian McNamara

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved