|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-09-28 16:37:58
Diego Bernini:
> Hi,
> see these lines:
>
> boost::shared_ptr<Executor> executor(&(createExecutor(subclass,name)));
> if(!executor) {
> throw LoadingClassException("createExecutor function
> of\""+subclass+"\" return null.");
> }
> //executor points to an object of class ExecDebugger that IS A Executor
> //(it's a plugin loaded at run time via Qt)
>
> boost::shared_ptr<Nameable> a=executor;
> boost::shared_ptr<Executor> sp;
>
> sp=boost::dynamic_pointer_cast<Executor>(a);
It's possible that dynamic_cast doesn't work across dynamic libraries on
your platform.
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