'Instance' Data for Server-Side Objects
- From: "Adam Buckley" <adambuckley gmx net>
- To: <orbit-list gnome org>
- Subject: 'Instance' Data for Server-Side Objects
- Date: Mon, 3 Dec 2001 00:41:41 +0100
Hi Gurus,
How do I set 'instance' data for server-side object instances?
Ie, in server.c, I'd like to do something like this:
// Normal creation from echo-skelimpl.c
Echo echoServerObj1 = impl_Echo__create(poa, &env);
Echo echoServerObj2 = impl_Echo__create(poa, &env);
// Can I do this?
echoServerObj1->something->specialNumber = 1;
echoServerObj2->something->specialNumber = 2;
// Then bind echoServerObj's with unique names etc...
And in the implementation, I'd like to do something like this:
static void impl_Echo_echoString(impl_POA_Echo *servant,
CORBA_char *msg, CORBA_Environment *env)
{
// Can I do this?
int servantNumber = servant->something->specialNumber;
printf("servant %d says: %s\n", servantNumber, msg);
return;
}
Could anyone demonstrate how to do it? Or point me to some documentation?
This is one time when object-orientated programming would come in handy...
:o)
Many thanks in advance,
- Adam.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]