Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What if I have multiple versions of the same interface (Ive added new member functions as theyve become necessary), and I want to keep track of which version is implemented by different plugins?

0
Posted

What if I have multiple versions of the same interface (Ive added new member functions as theyve become necessary), and I want to keep track of which version is implemented by different plugins?

0

The simplest way is to change the name of your interface (or the namespace it is in) each time its contents change. This is actually what I would recommend. However, it is also possible to include such information as part of the factory. A factory can contain arbitrary information about the plugin that it loads through the Info type. In the hello_world sample, the Info type is an int, and the hello class has a number (it could be a version) of 1, and the world class has a version of 2. In the multiple_inheritance sample, this type is a string. This will be detailed in greater detail in this documentation.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123