source: trunk/third/ORBit/docs/IDEA1 @ 15271

Revision 15271, 1.4 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15270, which included commits to RCS files with non-trunk default branches.
Line 
1<July 6> This feature will wait until we get a full-featured ORB that
2talks over the network. I don't think anyone (especially myself) has
3enough knowledge to implement it on the first go-round. -ECL
4
5-----------------------------------------------------------------------
6
7Fast way to avoid marshalling at all for calls to stuff in the same
8address space:
9
10typedef struct CORBA_Object_struct *CORBA_Object;
11struct CORBA_Object_struct {
12        void (*release)(CORBA_Object _handle, CORBA_Environment &ev);
13};
14
15#define CORBA_Object_release(_handle, evptr) _handle->release(_handle, evptr)
16
17You would do this for all subclasses of an object, too:
18
19typedef struct example_struct *example;
20struct example_struct {
21        void (*op1)(CORBA_Object _handle, int inparam, CORBA_Environment &ev);
22};
23
24#define example_op1(_handle, inparam, evptr) \
25        _handle->release(_handle, inparam, evptr)
26
27That is all.
28
29-----------------
30Multiple inheritance makes this not-work.
31
32However, we can still have our fun.
33
34gulong CORBA_Object_class_id;
35typedef struct CORBA_Object_struct *CORBA_Object;
36struct CORBA_Object_struct {
37        gpointer *func_lookup_table;
38};
39typedef struct CORBA_Object_methods *CORBA_Object_methods
40struct CORBA_Object_methods {
41        void (*release)(CORBA_Object _handle, CORBA_Environment &ev);
42};
43
44
45#define CORBA_Object_release(_handle, evptr) \
46((CORBA_Object_methods)_handle->func_lookup_table[CORBA_Object_class_id])->release(_handle, evptr)
Note: See TracBrowser for help on using the repository browser.