class wrapping (was: [omniORB] Date: Wed, 5 Jan 2000 18:46:39 +0300)

Alik Kurdjukov alik@oxiris.net
Thu, 6 Jan 2000 14:08:27 +0300


Hello!

> > Is there any pattern available for wrapping class hierarhy to CORBA?
>
> what is your supposed relationship between class Class_A and interface A ?
> Is Class_A an implementation of interface A or is Class_A a wrapper which
> delegates to a servant implementing interface A ?

Interface A is a wrapper for Class_A. All real implementation is in Class_A,
but I need to have all methods of Class_A implemented in interface A throu
calling to embedded object of Class_A.

My suggestion for solving stated problem was:

class CORBA_Impl_A : virtual public _sk_A {
	....
	A* getEmbedded();
private:
	A* embeddedObject;
};

class CORBA_Impl_B : virtual public _sk_B {
	....
	void method(A_ptr a);
	B* getEmbedded();
private:
	B* embeddedObject;
};

an so on. But there's no solution of getting CORBA_Impl_A from object A_ptr
in CORBA_Impl_B::method because of virtual inheretance ;((

In this task I don't need any location independance of the embedding object
like CORBA_Impl_...

Best regards,
Alik.