$include_dir="/home/hyper-archives/boost-users/include";
include("$include_dir/msg-header.inc")
?>
- Next message: Merrill Cornish: "[Boost-users] Serialization of ptr_container"
- Previous message: Wu Yinghui, Freddie: "[Boost-users] Complaint about Current Boost Build System"
- Next in thread: Peter Dimov: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Reply: Peter Dimov: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Reply: Stuart Dootson: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Maybe reply: Kerner, Jacques: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Maybe reply: Kerner, Jacques: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Maybe reply: Kerner, Jacques: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
Hi,
I would like to create a functor for calling functions in a chain like
this :
car.GetRigidBody().GetPosition().GetX()
What is the best way to do that using bind (and lambda ?)
The car.GetRigidBody() is easy : bind(&Car::GetRigidBody, &car) , but
then I am a bit stuck. Note that I don't want to store the result of
car.GetRigidBody(). I want the final functor to call all the functions
everytime its operator() is called. So
bind (
&Position::GetX,
&bind (
&RigidBody::GetPosition,
&bind (
&Car::GetRigidBody,
&car
)()
)()
)
would not be acceptable...
Any help greatly appreciated
Jacques Kerner
- Next message: Merrill Cornish: "[Boost-users] Serialization of ptr_container"
- Previous message: Wu Yinghui, Freddie: "[Boost-users] Complaint about Current Boost Build System"
- Next in thread: Peter Dimov: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Reply: Peter Dimov: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Reply: Stuart Dootson: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Maybe reply: Kerner, Jacques: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Maybe reply: Kerner, Jacques: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
- Maybe reply: Kerner, Jacques: "Re: [Boost-users] Bind, lambda and how to chain relative function calls"
$include_dir="/home/hyper-archives/boost-users/include";
include("$include_dir/msg-footer.inc");
?>