| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Could any corba guru help me ? =Question:= How I can access method form my old library class from servant class ? i.e do something like this: class One_impl: ublic Foreign{};void Two:doSomethingElse( One_ptr p ) { Foreign *f = dynamic_cast<Foreign *>(p); p->doSomething(); } =Details:= I have next construction: OLD LIBRARY: class Foreign { void doSomething(); } IDL: interface One {} interface Two { doSomethingElse( in One s ); } SERVANT: class One_impl : public POA_one, Foreign {} void Two:doSomethingElse( One_ptr p ) { Foreign *f = dynamic_cast<Foreign *>(p); p->doSomething(); } How I can access method Foreign::doSomething() from Two::doSomethingElse() ? Now I use dirty workaround: interface One { One implementation(); } One One::implementation() { return this; // return pointer instead of expected _retn, // to be able to cast it later } Is there a right way ? Thank you! DM\S |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.