|
Boost Users : |
Subject: Re: [Boost-users] signals/slots and boost::functions
From: david.weber_at_[hidden]
Date: 2008-12-10 15:43:19
<snip>
>
> target returns a pointer to the function object. If TargetType is
> void(*)() target
> will return an object of type void(**)().
>
So, I modfied my function to:
unsigned long long slotAddr = (unsigned long long)slot.target<
void(*)() >();
LOG4CXX_DEBUG(logger_, "*** slotAddr = " + (boost::format("%016X") %
slotAddr).str());
But my prints of the value show:
connectCreateTypeSignal in
*** slotAddr = 0000000000000000
Looking at the debugger, it's setting the results to zero in
function_base.hpp, line 537, when it makes the call to vtable->manager.
This is dying down in function_base.hpp(284) where this code is run:
const BOOST_FUNCTION_STD_NS::type_info& check_type =
*static_cast<const
BOOST_FUNCTION_STD_NS::type_info*>(out_buffer.const_obj_ptr);
if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type,
typeid(Functor)))
out_buffer.obj_ptr = &in_buffer.func_ptr;
else
out_buffer.obj_ptr = 0;
And it is taking the "else" path out of the code.
Looking at the debugger, all I really want is the value of
slot.functor.obj_ptr (which I can see in the debugger, but I'm assuming
that I shouldn't be accessing directly [nor have I checked the
public/protected/private-ness of it either] )
Thanks
--dw
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