[omniORB] transparency question
Gary D. Duzan
gdd0@gte.com
Wed, 08 Apr 1998 14:44:09 -0400
In Message <Pine.SGI.3.96.980408100118.21776A-100000@Andy.ERC.MsState.Edu> ,
Michael Stokes <stokes@ERC.MsState.Edu> wrote:
=>
=>#include "point.h"
=>
=>#include "spointSK.cc"
=>
=>class SPoint : public virtual Point, _sk_SPoint {
=>};
This may work, but I don't believe it is guaranteed to work in
general. You might want to look at implementing something resembling a
"tie" as mentioned in the BOA server-side mapping to do delegation
instead of inheritance. It should be relatively straightforward to
implement, looking something like:
class SPoint : public _sk_SPoint {
private:
Point *point;
public:
SPoint(Point *p) : point(p) { }
void getX( CORBA::Double& x, CORBA::Double& y, CORBA::Double& z) {
point->getX(x,y,z);
}
};
Just repeat for each bit of interface. It may not be pretty, and
having the ORB generate tie template classes would be nice, but it
shouldn't be too hard to do yourself. (I certainly hope that is the
case, anyway, since I plan to do something similar in my own project.)
Gary Duzan
GTE Laboratories