zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2k stars 592 forks source link

Move Proxy Factory Logic from `_Prx` to `_PrxI` #2311

Closed InsertCreativityHere closed 2 weeks ago

InsertCreativityHere commented 2 weeks ago

We provide a variety of factory functions for transforming proxies, proxies which themselves are split into 2 parts:

All the logic for these factory functions is on the interface, instead of the class. Which is kind of weird on it's own: usually implementation is done by classes, not interfaces. But our setup is worse because the interface implementations all look like:

default ObjectPrx ice_adapterId(...) { return _ice_adapterId(...); }
default ObjectPrx _ice_adapterId(...) { /*actual impl*/ }

Since they're interface methods, they're completely public, which is kind of lame.


This PR removes all the implementation logic from the interface side. Now the interface just has: ObjectPrx ice_adapterId(...); a 'pure virtual function'.

And these implementations were moved into the corresponding class. This completely eliminates these unfortunate hidden-underscore-methods.