diff --git a/Code/ApplicationEngine/otbWrapperApplication.cxx b/Code/ApplicationEngine/otbWrapperApplication.cxx index b6677b42fe410d9c897ae84d1326b5cd11e6199c..48a58045ff6f73b00ee395fd0757a436de9fd9ac 100644 --- a/Code/ApplicationEngine/otbWrapperApplication.cxx +++ b/Code/ApplicationEngine/otbWrapperApplication.cxx @@ -242,6 +242,19 @@ UserLevel Application::GetParameterUserLevel(std::string paramKey) const return GetParameterByKey(paramKey)->GetUserLevel(); } + +/* Return the role (input/output) of a parameter */ +Role Application::GetParameterRole(std::string paramKey) const +{ + return GetParameterByKey(paramKey)->GetRole(); +} + +/* Return the role (input/output) of a parameter */ +void Application::SetParameterRole(std::string paramKey, Role role) +{ + GetParameterByKey(paramKey)->SetRole(role); +} + /* Get the parameter type from its name */ ParameterType Application::GetParameterType(std::string paramKey) const { diff --git a/Code/ApplicationEngine/otbWrapperApplication.h b/Code/ApplicationEngine/otbWrapperApplication.h index e1f7d345ac412a25091cdf5c2fa3a4817cd1e7e3..9711db49d4e3b95465f4105c5ad20b1f446b4bb3 100644 --- a/Code/ApplicationEngine/otbWrapperApplication.h +++ b/Code/ApplicationEngine/otbWrapperApplication.h @@ -146,6 +146,10 @@ public: /* Return the user level of access to a parameter */ UserLevel GetParameterUserLevel(std::string paramKey) const; + /** Set/Get the role of the parameter */ + Role GetParameterRole(std::string paramKey) const; + void SetParameterRole(std::string paramKey, Role role); + /* Get the parameter type from its name */ ParameterType GetParameterType(std::string paramKey) const;