[omniORB] python generated filename problem

Richard Bouska richard@bouska.cz
Fri Nov 29 13:39:00 2002


Duncan Grisby wrote:

>On Friday 22 November, Richard Bouska wrote:
>
>  
>
>>for ex. I have two interfaces called IA in IA.idl file one in module MA 
>>the othe on MB,
>>idl/MA/IA.idl
>>idl/MB/IA.idl
>>They are diferent.
>>When I generate stubs and skeletons in one directory the first IA_idl.py 
>>gets overwritten.
>>Is there any chance to force the compiler generate structure like this:
>>    
>>
>
>Use the -Wbpackage option to omniidl.
>
>Cheers,
>
>Duncan.
>
>  
>
It does not solve the problem if a use the -Wbpackage=x the output would 
go in the x direcotry
which has __init__.py but I will have to change all my source from
class A(MA.IA__POA):
    pass
class B(MB.IA__POA):
    pass

 to something like:
class A(x.MA.IA__POA):
    pass
class A(y.MB.IA__POA):
    pass

where the x and y will be just some redundand junk to work around the 
ORB limitations.
The anount of source to be changed is around 3MB in more the 200 files.

The real need for it is when I have two modules DB1 and DB2 anf both 
have interface Controller.
Each module is represented by directory and each interface has its own 
file. So I have two files Controller.idl one in DB1 and the second in 
DB2 directory and building them in the same directory -> 
Controller_idl.py gets overwritten.

My current solution is that the files are called DB1Controller.idl and 
DB2Controller.idl altrough the define interface Controller so I get:
DB1Controller_idl.py and  DB2Controller_idl.py  in the same folder (the 
root of the generated files) but they are both defining interface called 
Controller which is just the work around which makes the maintenace to 
be a nightmare.
The current rule we use is: name file as the interface except for cases 
where in different directory is file of the same name then name is a 
concatenation of module name and the file name.

So can I force the oniidl to generate the Controller_idl.py in the DB1 
and DB1_POA directory?

Thanks in advance
Richard Bouska