From 793bd13f0420c6a99806e7655d725477b63dcbac Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Mon, 19 Feb 2018 15:33:50 +0100
Subject: [PATCH] ENH: update SWIG wrappers for new bool parameter

---
 Modules/Wrappers/SWIG/src/otbApplication.i | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Modules/Wrappers/SWIG/src/otbApplication.i b/Modules/Wrappers/SWIG/src/otbApplication.i
index 56005534a7..fc90aa65e6 100644
--- a/Modules/Wrappers/SWIG/src/otbApplication.i
+++ b/Modules/Wrappers/SWIG/src/otbApplication.i
@@ -503,6 +503,7 @@ class ApplicationProxy(object):
 				ParameterType_Empty : 'ParameterType_Empty',
 				ParameterType_Choice : 'ParameterType_Choice',
 				ParameterType_Group : 'ParameterType_Group',
+				ParameterType_Bool : 'ParameterType_Bool'
 			}.get(parameter_type, 'ParameterType_UNKNOWN')
 
 		def __str__(self):
@@ -530,6 +531,8 @@ class ApplicationProxy(object):
 			  return self.SetParameterFloat(paramKey, value)
 			elif paramType in [ParameterType_Empty]:
 			  return self.EnableParameter(paramKey)
+			elif paramType in [ParameterType_Bool]:
+			  return self.SetParameterString(paramKey, str(value) )
 			elif paramType in [ParameterType_Group]:
 			  return ApplicationProxy(self, paramKey)
 			elif paramType in [ParameterType_Choice]:
@@ -557,6 +560,8 @@ class ApplicationProxy(object):
 			  return self.GetParameterFloat(paramKey)
 			elif paramType in [ParameterType_Empty]:
 			  return self.IsParameterEnabled(paramKey)
+			elif paramType in [ParameterType_Bool]:
+			  return bool(self.GetParameterInt(paramKey))
 			elif paramType in [ParameterType_Group, ParameterType_Choice]:
 			  return ApplicationProxy(self, paramKey)
 			else:
-- 
GitLab