[omniORB] transparency question

Michael Stokes stokes@ERC.MsState.Edu
Wed, 8 Apr 1998 11:31:14 -0500 (CDT)


There is a generic question and probably should be posted in another
group, but I'm going to offer it up anyway.

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.

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.


....

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);
};

...

I would then define an entity called an SPoint using the following...

interface SPoint {
      void getX( out double x, out double y, out double z);
};

with the implementation C++ header looking like the following...

#include "point.h"

#include "spointSK.cc"

class SPoint : public virtual Point, _sk_SPoint {
};


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.

Questions...

1) Is it possible to do this at all?

I would appreciate any positive or negative (though constructive)
comments.

Thanks
Mike