Page 1 of 1

IDL typedef generation fails

PostPosted: Fri 21 Aug 2015 16:11
by morini
The IDL code generation tool doesn’t generate a typedef defined as nested class named ObservantId marked with stereotype <<typedef>>.

My interface definition (Observant) is nearly as simple as possible. Have a look at the attached screen shots.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
The generated IDL file looks as follows:
Code: Select all
#ifndef OBSERVATION_OBSERVANT_H
#define OBSERVATION_OBSERVANT_H


#include <orbsvcs/CosNotifyComm.idl>

module Observation {

//An Observant may be observated by a, possibly remote, Observer.
//Each Observant has an id unique in the entire applications operation domain
//which may be asked for using id(). The Observer uses it internally to filter the
//observated objects Observation events.

interface Observant : CosNotifyComm::StructuredPushSupplier
{
  readonly attribute ObservantId id;

  ObservantId get_id();

} /* Observant */;

}; // module Observation
#endif


As you’ll see: The typedef statement is missing.

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
The generators log output is:

IDL generator release 5.0.3

Generate code for Observant in /Users/tcs/src/CORBA/Observation/idl/Observant.idl
Embedded class ObservantId not generated

/Users/tcs/src/CORBA/Observation/idl/Observant.idl not modified

Generation done : 1 warnings, 0 errors

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

As a temporary fix I’ve added an "extra member“ defining the type.

I’m using Bouml 6.8.6


Thanks
Thomas

Re: IDL typedef generation fails

PostPosted: Fri 21 Aug 2015 16:25
by Bruno Pagès
You are right, the types can be nested, I will fix that

Thank you for the bug report

Re: IDL typedef generation fails

PostPosted: Sun 23 Aug 2015 18:48
by Bruno Pagès
The release 6.8.7 is available, fixing this bug

Re: IDL typedef generation fails

PostPosted: Sun 23 Aug 2015 19:34
by morini
Hey, the fastest support I've ever seen!

Thanks, I'll try it immediately.

Re: IDL typedef generation fails

PostPosted: Sun 23 Aug 2015 20:05
by morini
Sorry, but there's yet another bug coming with this fix. The generator now creates the typedef but it uses the UML type instead of translating it into the IDL type.

I would expect:

Code: Select all
typedef unsigned long ObservantId;


but I get:

Code: Select all
typedef ulong ObservantId;

Re: IDL typedef generation fails

PostPosted: Sun 23 Aug 2015 20:29
by Bruno Pagès
The way the typedef are generated is unchanged, this is in fact an old unknown bug

To bypass that you can use directly "unsigned long" rather than "ulong" in the typedef definition

I need a full day to compile & packages bouml for all the distributions each time I make a new version, because there is a simple way to bypass this bug I will probably not make the new version before the next weekend, allowing you to find new bugs may be ;) IDL is probably not very used

Re: IDL typedef generation fails

PostPosted: Sun 23 Aug 2015 21:08
by morini
That's nice. If there's a fix around something it's ok.

Many thanks!

Re: IDL typedef generation fails

PostPosted: Thu 27 Aug 2015 16:08
by Bruno Pagès
The release 6.8.8 is available, fixing this bug

Re: IDL typedef generation fails

PostPosted: Thu 27 Aug 2015 18:17
by morini
Many thanks,

its working great!