VB7.0 - all Platforms:Deprecated Anonymous Types in CORBA IDL

VB7.0 - all Platforms:Deprecated Anonymous Types in CORBA IDL

Problem:

  • Product Name: VisiBroker C++
  • Product Version: 7.0 and later
  • Product Component: idl2cpp
  • Platform/OS Version: ALL

When wrote an IDL like:

struct Part {
   string id;
   string code;
   sequence <Part> array;
};

idl2cpp will not generate correct helper class for this IDL.

Resolution:

A workaround to rewrite the IDL as:

struct Part;
typedef sequence <Part> PartArray;
struct Part
{
  string id;
  string code;
  PartArray array;
};

will solve the problem.

CR7923 is filed for this issue.

Reference:

CORBA 2.6 Specification (formal/01-12-35):

3.10.6 Deprecated Anonymous Types
IDL currently permits the use of anonymous types in a number of places. For example:
struct Foo {
   long value;
   sequence<Foo> chain; // Legal (but deprecated)
}

Anonymous types cause a number of problems for language mappings and are therefore deprecated by this specification. Anonymous types will be removed in a future version, so new IDL should avoid use of anonymous types and use a typedef to name such types instead. Compilers need not issue a warning if a deprecated construct is encountered.

 
Support Case # 639021

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 20:02
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.