[omniORB] omniIDL: Inconsistent C++ interface from
cross-moduletypedefs
Stefan Näwe
naewe.s at atlas.de
Tue Aug 2 10:43:20 BST 2005
Andrew Miller wrote:
> Hi all,
>
> omniIDL appears to add an extra * to the type when you use a type from another
> module which is already a pointer type.
>
> Example: In the module dom:
> typedef wstring DOMString;
>
> which results in:
> typedef CORBA::WChar* DOMString;
>
> In an interface within the dom module, the following attribute:
> readonly attribute DOMString nodeName;
> Correctly results in:
> CORBA::WChar* nodeName();
>
> However, if you use a similar attribute in an interface in another module, for
> example:
> readonly attribute dom::DOMString referrer;
> you get:
> dom::DOMString* referrer();
>
> However, since dom::DOMString is CORBA::WChar*, referrer now returns a pointer
> to a pointer to a CORBA::WChar, which (at least by my reading) is not correct
> according to the CORBA C++ mapping.
Hhhmmm...
If I use this IDL:
//-------------------------------------------
module dom
{
typedef wstring DOMString;
interface Node
{
readonly attribute DOMString nodeName;
};
};
module dom2
{
interface Node2
{
readonly attribute dom::DOMString referrer;
};
};
//-------------------------------------------
This is what I get:
//-------------------------------------------
class _objref_Node2 :
public virtual CORBA::Object, public virtual omniObjRef
{
public:
CORBA::WChar* referrer();
...
//-------------------------------------------
I don't see any 'pointer to pointer to CORBA::WChar'.
Stefan
--
----------------------------------------------------------------------
Stefan Naewe ATLAS Elektronik GmbH
Dept.: NUS T4
phone: +49-(0)421-457-3969 Sebaldsbruecker Heerstr. 235
fax: +49-(0)421-457-3913 28305 Bremen
More information about the omniORB-list
mailing list