Problem: Product Name: VisiBroker Product Version: All Product Component: idl2cpp Platform/OS Version: All You need to change an operation of a CORBA server. However, since the server has been used widely, you do not want to just change the operation, rather need to put an additional operation. Is it possible to have two method with same name but different signature in IDL? Resolution: This article explains why function overloading is impossible in IDL file. Unfortunately, operation names are scoped by their enclosing interface and must be unique within that interface. This restriction was introduced because overloading makes it difficult to map IDL to a non Object-oriented language such as C. Moreover, idl2cpp assumes every method in an interface has individual name. For example, a snippet of file bank_s.cc of bank_agent example which generated by idl2cpp bank.idl: ... static ::CORBA::MethodDescription _sk_Bank_Account_methods[] = { {"balance", POA_Bank::Account::_balance} }; ... The first element of the record is method's name so it is not able to have the same name in it.
↧