[omniORB] transparency question

Boris Khanales boris@imagine-sw.com
ed, 8 Apr 1998 14:57:36 -0400


Whould you consider this design:

interface PointInterface
{
	struct PointStru
	{
		double x_;
		double y_;
		double z_;
	}
=09
	get( out PointI, YouMightNeedSomeId );
}

// C++
class Point
{
public:
	......

private:
	PointStru data_;
};


It isn't =A8very distributed" and maybe not very OO like
but very simple.

You can also use PointInterface to implement thin share layer.



> From owner-omniorb-list@orl.co.uk Wed Apr  8 14:42 EDT 1998
> X-Authentication-Warning: Andy.ERC.MsState.Edu: stokes owned process =
doing -bs
> Date: Wed, 8 Apr 1998 12:31:14 -0400
> From: Michael Stokes <stokes@ERC.MsState.Edu>
> To: omniorb-list@orl.co.uk
> Subject: [omniORB] transparency question
> Mime-Version: 1.0
>=20
>=20
> There is a generic question and probably should be posted in another
> group, but I'm going to offer it up anyway.
>=20
> I am writing a scientific application where I will have many thousands =
of
> objects called cells, nodes, edges, etc.  In general, these objects =
will
> not be shared and therefore do not need to be "CORBISIZED".  However, =
at
> boundaries, I want to share edges, nodes, and cells and would like to =
use
> CORBA to do this, but, I do want the sharing to be transparent to the
> application.  Based on what I've learned, I would have to use CORBA =
var
> types and casts in the non-shared object types, and I find this =
awkward at
> best.
>=20
> I thought I would do using the following example. I will define a =
class
> called point with the following c++ header.  Note that I use CORBA
> symantics, but it just a simple C++ class.
>=20
>=20
> ....
>=20
> class Point {
> protected:
>    double _x[3];
> public:
>    Point();
>    Point( CORBA:Double x, CORBA::Double y, CORBA::Double z);
>    void getX( CORBA::Double& x, CORBA::Double& y, CORBA::Double& z);
> };
>=20
> ...
>=20
> I would then define an entity called an SPoint using the following...
>=20
> interface SPoint {
>       void getX( out double x, out double y, out double z);
> };
>=20
> with the implementation C++ header looking like the following...
>=20
> #include "point.h"
>=20
> #include "spointSK.cc"
>=20
> class SPoint : public virtual Point, _sk_SPoint {
> };
>=20
>=20
> The assumption here is that it is possible to write the CORBA
> implementation using a composite of a "vanilla" C++ object and a CORBA
> stub implementation.
>=20
> Questions...
>=20
> 1) Is it possible to do this at all?
>=20
> I would appreciate any positive or negative (though constructive)
> comments.
>=20
> Thanks
> Mike
>=20
>=20