apache / celix

Apache Celix is a framework for C and C++14 to develop dynamic modular software applications using component and in-process service-oriented programming.
https://celix.apache.org/
Apache License 2.0
158 stars 85 forks source link

Annotation of Consumer/Provider Type #701

Open PengZheng opened 6 months ago

PengZheng commented 6 months ago

When looking at a Celix Service Interface for the first time, it is pretty easy to get confused as to whether you should implement and register the service in the header file or just track and use the service. Though we don't support annotation directly in C++, adding Doxygen comments such as @qualifer ProviderType or @qualifer ConsumerType should be enough to help our users.

Note that qualifer is a standard Doxygen command. If users hover over the type documented this way in an IDE like CLion, the qualifier (ProviderType/ConsumerType) will appear in the generated documentation.

pnoltes commented 6 months ago

This would be an welcome addition.

This could also have an impact on how we handle service versions bumps. Currently if a service gets a additional function/method, this is treated as a major update for the service. But if the service is annotation as a provided type, a minor bump is enough, because from a user point of view the the service is provided and an additional function/method is not a breaking change.