moving from interface class to implementation class
Bernd Daum
daum@dik.maschinenbau.tu-darmstadt.de
Wed, 15 Oct 1997 20:40:47 +0200 (MET DST)
Hi everybody!
Since implementation classes are derived from
skeleton classes and they are derived from the
stub classes, it's something difficult, to get
a pointer to the implementation object.
Example:
IDL:
interface A {.....};
C++:
class A_i: virtual public _sk_A {};
If i have an object reference ('ref') for an A and
want to get an pointer ('p') for the implementation
object, i usually use the C++ dynamic cast:
A_ptr ref;
A_i* p = dynamic_cast<A_i*>(ref);
My problem:
-----------
We are currently working on a Digital Unix platform using
the DEC C++ Compiler, version 5.5, which doesn't support
the C++ dynamic cast.
Is there anybody who knows, how to cast from an interface class
to an implementation class without using the C++ -
dynamic cast (other Orbs offer for this case macros)?
Thank you in advance.
Bernd Daum
---------------------------------------------------------------------------
Dipl.-Ing. Bernd Daum DDDD K K
FG Datenverarbeitung in der Konstruktion (DiK) D D *** K K
TU Darmstadt D D *** K K
Petersenstr.30 D D KK
D-64287 Darmstadt D D I KK
Phone: +49 6151 16 5441 D D I K K
Fax: +49 6151 16 6854 D D I K K
Email: daum@dik.maschinenbau.tu-darmstadt.de DDDD IIIII K K
---------------------------------------------------------------------------