From: John Torjo (john.lists_at_[hidden])
Date: 2004-07-26 04:03:05
David Abrahams wrote:
> Vladimir Prus <ghost_at_[hidden]> writes:
>> boost::dll plugin("foo");
>> plugin["bar"].as<void (void)>();
>>or something trickier, like:
>> - calling C++ functions:
>> plugin.call<void (void)>("bar") -- no need for "extern "C"
I love this! It would really be great!
How about something like
plugin.func<void(void)>("some_func") returning a callable functor - some
wrapper over boost::function, which
- will work as long as the plugin is in memory
- will throw otherwise
- eventually have a method for knowing if you can still call this function
I'd certainly have uses for this.
-- John Torjo Freelancer -- john_at_[hidden] Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ Professional Logging Solution for FREE -- http://www.torjo.com/code/logging.zip (logging - C++) -- http://www.torjo.com/logview/ (viewing/filtering - Win32) -- http://www.torjo.com/logbreak/ (debugging - Win32) (source code available)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk