|
Boost Users : |
Subject: [Boost-users] [xpressive] Calling a placeholder method from within an action?
From: Ami Ganguli (ami.ganguli_at_[hidden])
Date: 2009-10-08 08:53:42
Hi all,
I'm using an object as a placeholder, and would like to call various
methods to the object from within my actions. Something along the
lines of:
port = (s1= *digit)
[ _placeholder->setPort( as<int>(s1) ) ];
I've found a way to do something equivalent using method pointers, but
the resulting code is really opaque. I'm afraid nobody else will ever
be able to figure out what I've done.
I also know I can do this by creating separate function objects for
each method that will be called. This is less opaque, but really
verbose. I end up with hundreds of lines of boilerplate code.
Is there a "right" way to achieve something similar?
Regards,
Ami.
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