Book a Demo

Author Topic: Corba IDL Codegeneration  (Read 2720 times)

langbr

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Corba IDL Codegeneration
« on: March 27, 2006, 10:30:43 pm »
Hello,

I try to evaluate the corba idl codegeneration facility.

First I reengineered an existing IDL file with an union in it and then I generated Code of it.
In the generated code I only see the comments of the different switch cases and the type of the switch is a boolean while the switch type in the original IDL file is an own enumeration type.

Second I tried to model my own union, but I didn't have any success. I there any documentation available? Or are there public guidelines for modeling CORBA structures "UML Profile for CORBA"?


Bruno

SebastienRoy

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
    • View Profile
Re: Corba IDL Codegeneration
« Reply #1 on: March 30, 2006, 12:36:24 pm »
Hello Bruno,

The switching type of the union is generated according to the value of the "switchType" tag of the class.
The cases values are generated according to the "cases" tag of the Union attributes.

Example :
  • Create a class (named MyUnion for instance) and set the stereotype to "CORBAUnion".
  • Display the tagged values window ( View / Tagged Values )
  • Select the class in the diagram or in the project browser and create a new tagged value named "switchType" and having "long" as a value
  • add attributes to your class, choose a type or not (if not it will be generated as "any"
  • For each attribute, create a tagged value named "cases" having as a value "case 1 :" for instance.
  • Generate
  • Enjoy ;-)


I didn't found a documentation for that, but I deduced it from the IDL code templates (Settings / Code Generation template. Language IDL. Templates : Class Declaration and Attribute Declaration. Stereotype : CORBAUnion)

Sebastien