generated adaptors/proxy: differentiate similarly named methods/properties #276
12-3-8-s9b9o9j9t
started this conversation in
General
Replies: 1 comment
-
@12-3-8-s9b9o9j9t In C++, you can simply use scope resolution operator as a qualified lookup to tell the compiler which variant of the method (from which base class) you want to be called. Like so: MyBluezProxy proxy; // MyBluezProxy inherits from both generated interface classes org::bluez::GattManager1_proxy and org::bluez::Media1_proxy
proxy.org::bluez::GattManager1_proxy::RegisterApplication(); // RegisterApplication() on GattManager1_proxy interface will be called
proxy.org::bluez::Media1_proxy::RegisterApplication(); // RegisterApplication() on Media1_proxy interface will be called |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I saw that bluez (this bad boy again) has similarly named methods
RegisterApplication
andUnregisterApplication
, with the same arguments, under the interfacesorg.bluez.GattManager1
andorg.bluez.Media1
.When creating a proxy to this object with the convenient API, we can differentiate them thanks to
.onInterface()
, but how could we do it using only one generated proxy implementing both interfaces ?Beta Was this translation helpful? Give feedback.
All reactions