Update How to deprecate authored by Victor Poughon's avatar Victor Poughon
So you want to deprecate something in OTB? Follow the guide:
## A C++ class
#### A C++ class
In the doxygen documentation of the class, add the `\deprecated` keyword.
In the class declaration, use the `[[deprecated]]` attribute. If the class declaration already has an export macro, use the macro `_DEPRECATED_EXPORT`.
## A method of a C++ class
#### A method of a C++ class
Use the `[[deprecated]]` attribute.
## A part of the Python API
#### A part of the Python API
TODO
## An OTB application
#### An OTB application
Add the tag deprecated:
......@@ -22,11 +22,13 @@ Add the tag deprecated:
AddDocTag(Tags::Deprecated);
```
## An OTB module
#### An OTB module
Add the keyword `DEPRECATED` in the call to `otb_module()` macro in file `otb-module.cmake`
## How to disable deprecated features when `OTB_USE_DEPRECATED=OFF`?
#### How to disable deprecated features when `OTB_USE_DEPRECATED=OFF`?
For an example, see [this MR](https://gitlab.orfeo-toolbox.org/orfeotoolbox/otb/merge_requests/236/diffs)
* If you deprecate a whole module, it will be disabled during configure step.
* If you want to deprecate a C++ class and the associated tests: use variable `OTB_USE_DEPRECATED` to protect the inclusion of this class in `src/CMakeLists.txt` and `test/CMakeLists.txt`
......
......