[omniORB] Duplicate Function in ominiidl-CPP generated code when using AMI for empty Interface
Nico Lochner
lochner at ixus.de
Fri Feb 3 15:50:13 UTC 2023
Hi,
please consider the following minimal IDL-Definitions:
File Test1.idl:
module Test{
interface Test_A
{
};
};
File Test2.idl:
module Test{
interface Test_B
{
};
};
Compiled with the commands:
omniidl.exe -bcxx -Wbami Test1.idl
omniidl.exe -bcxx -Wbami Test2.idl
the ominiidl Compiler generates two files, which both of them has the
following code:
class _0RL_poll__00000000
: public virtual Test::AMI_Test_[A/B]Poller,
public virtual omniAMI::PollerImpl
{
public:
_0RL_poll__00000000(omniAsyncCallDescriptor* _cd)
: omniAMI::PollerImpl(_cd) {}
void* _ptrToValue(const char* _id);
};
void* _0RL_poll__00000000::_ptrToValue(const char* _id)
{
if (_id == omniAMI::PollerImpl::_PD_repoId)
return (void*)(omniAMI::PollerImpl*)this;
return Test::AMI_Test_[A/B]Poller::_ptrToValue(_id);
}
The Linker then obviously complains about double definitions of the
function
_0RL_poll__00000000::_ptrToValue
Usually this class gets a name with some random ID before of the 00000000
(like _0RL_poll_a8a3b903a412ba74_00000000) which might be generated from
some kind of hash out of the functions in the interface. This makes it
unique among
the whole project.
Is it possible to achieve this for "empty" interfaces as well?
Thanks & Regards
Nico
:-)
----------------------------------------
Nico Lochner lochner at ixus.de
iXus Technologiedienstleistungen GmbH
Potsdamer Str. 86, 10785 Berlin
www.ixus.de Tel: 030-240 84 68-0
----------------------------------------
SteuerNr. 30/360/33081 UstID DE202620190
Handelsregister: HRB 72303
beim Amtsgericht Berlin-Charlottenburg
Sitz der Gesellschaft: Berlin
vertreten durch die Geschaeftsfuehrer
Nico Lochner, Sascha Wuerzburg
----------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.omniorb-support.com/pipermail/omniorb-list/attachments/20230203/fe1ab720/attachment.html>
More information about the omniORB-list
mailing list