ble icon indicating copy to clipboard operation
ble copied to clipboard

Improve deprecation of BLE API features

Open pan- opened this issue 10 years ago • 0 comments

Deprecation of features of BLE API can be more visible to end user. There is two ways to improve this:

  • Documentation: doxygen support a directive for deprecated elements: \deprecated. This tag should be use for all deprecated entities in BLE API.
  • Warning at compile time: compiler-polyfill now support a __deprecated_message macro. It can be used to provide a usefull information about deprecated feature at compilation time. This feature can be used to tag the following entities:
    • functions: void foo(void) __deprecated_message("This function is deprecated, use void bar(void) instead")
    • variables: int foo __deprecated_message("This variable is deprecated, use bar instead") = 0;
    • variables: int foo __deprecated_message("This variable is deprecated, use bar instead") = 0;
    • types: class Foo __deprecated_message("Foo class is deprecated, use Bar instead") { };
    • typedef: typedef Foo Bar __deprecated_message("This typedef is deprecated, use Baz instead")

pan- avatar Dec 18 '15 13:12 pan-