From f54104c72bedafb5c0f24629c021fc7606b115d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr> Date: Fri, 3 May 2019 17:23:15 +0200 Subject: [PATCH] ENH: add IsDeprecated() method to the application class --- .../ApplicationEngine/include/otbWrapperApplication.h | 3 +++ .../ApplicationEngine/src/otbWrapperApplication.cxx | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h index 3baadd6f0f..4ac8aeb9f0 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h @@ -672,6 +672,9 @@ public: virtual std::vector<std::string> GetDocTags() const; void AddDocTag(const std::string&); + + /** return wether the application has the "deprecated tag or not */ + bool IsDeprecated(); DocExampleStructure::Pointer GetDocExample(); unsigned int GetNumberOfExamples(); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 4297ae946d..1d64c7614e 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -267,6 +267,16 @@ void Application::AddDocTag(const std::string & tag) } } +bool Application::IsDeprecated() +{ + for (auto tag:m_DocTags) + { + if (tag==Tags::Deprecated) + return true; + } + return false; +} + DocExampleStructure::Pointer Application::GetDocExample() { if (!IsInitialized()) -- GitLab