[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Another quick CORBA q.
From: Lotzi Boloni <boloni () cs ! purdue ! edu>
Date: 1999-08-03 17:16:07
[Download RAW message or body]
> I want to do something like this:
>
> interface MyInterface
> {
> void addObject(in MyObject obj);
> MyObject object(in string key);
> };
>
> Is this possible without defining the interface for MyObject ?
You don't have to define an interface, but you have to declare
the structure in the IDL - as a conclusion, you must use the CORBA
datatypes (CORBA::Short and so on).
> I'd really like to be able to keep my existing code (for MyObject and
> all associated types) rather than having to switch all of it to use STL and
> CORBA types.
I know it seems a nuissance. The problem is the following: the CORBA
datatypes are platform, implementation, language and compiler independent.
A client running Java+Visibroker on a big endian machine should be able to
access a server running C++ + MICO on a little endian machine. The
conversion should happen automatically at marshalling/unmarshalling.
Making the conversion to the CORBA datatypes whereever you are
presenting/getting data from the network is a small price to pay for this.
And actually is a trivial job, because most CORBA datatypes map to
something very simple and can be handled by simple assignments. (But it is
still a nuissance).
> If I could just pass something like a void * and cast it I'd be happy :)
There is something called type "Any". I would not recommend it.
Lotzi
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic