passing references



With an idl like this:

interface client
{
  oneway void foo();
};

interface server
{
  oneway void dosomething(in client c);
};

there are two processes. The "client" process implements "interface client",
and passes a reference to the "server" process, which implements "interface
server". Like so:

client.c:

  c = impl_client__create(root_poa, &ev);
  server_dosomething(server, c, &ev);

server.c:

  static void
  impl_server_dosomething(impl_POA_server * servant,
                          client c, CORBA_Environment * ev)
  {
    client_foo(c, ev);
  }

The skels and stubs are all co-mingled by orbit-idl, so I end up having all the
marshalling code for the server bloating up the client, and vice versa.

Is there any way around this?

The problem is if I put these interfaces in separate files I can't declare
do_something() because "foo" is undeclared.

It's probably not enough memory to worry about. It just seemed odd to me.

b.c.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]