Boost logo

Boost Users :

From: Amit Bhatia (yg-boost-users_at_[hidden])
Date: 2003-07-30 23:09:54


Hello All!,
 I am trying to figure out a way of converting "pointer-to-member-function"
to a "pointer-to-function" so that I can pass it as a callback function
pointer to constructor of some third party class.
 I know there is NO direct way of doing this in c++.
 I am further constrained because of the following facts:

1. The fact that I am using a third party class for whose constructor I need
to pass pointers to functions having some specific signature.

2. I don't want to be using static declaration for the method that I wish to
pass to the third party constructor as a callback function(due to the fact
that static methods can access only access static data members).
 
 So if I am not mistaken, then, I suppose, that boost function library might
be of help in here by somehow using some elegant tricks' to do this task.
  (There is the fact also that every instance of my class has lot of data
which is different and I need access to the data for the method that I wish
to pass).

Am I right, or am I looking at the wrong place? If I am indeed looking at
the wrong place then where will it be best to look for it. I remember some
notes on binding in the documentation of the boost function library though.

Thanks in advance,
regards,
amit.

 


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net