diff --git a/CHANGES.current b/CHANGES.current index 065cde353..58d4f9bf2 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -8,7 +8,11 @@ Version 1.3.28 (unreleased). Now it is easy, for example to use the 'utitle' encoder in all the member methods, you type: - %rename("%(utitle)s",%isfunction,%ismember) ""; + %rename("%(utitle)s",%isfunction,%ismember) ""; + + or to ignore all the enumitems in a given class: + + %rename("$ignore", %isenumitem, %classname="MyClass") ""; Available predicates are (see swig.swg): @@ -38,6 +42,13 @@ Version 1.3.28 (unreleased). %ismember %isglobal + %innamespace + + %ispublic + %isprotected + %isprivate + + %classname These predicates correspond to specific 'match' declarations, which sometimes are not as evident as the diff --git a/Examples/test-suite/rename_camel.i b/Examples/test-suite/rename_camel.i index c333980e8..a2dc9ea2d 100644 --- a/Examples/test-suite/rename_camel.i +++ b/Examples/test-suite/rename_camel.i @@ -1,6 +1,7 @@ %module rename_camel %rename("%(utitle)s",%isfunction,%ismember) ""; +%rename("%(ctitle)s",%isvariable,%ismember) ""; %inline { struct GeometryFactory diff --git a/Lib/swig.swg b/Lib/swig.swg index 58cef54d7..7d498a092 100644 --- a/Lib/swig.swg +++ b/Lib/swig.swg @@ -221,6 +221,10 @@ static int NAME(TYPE x) { %rename("g_%(utitle)s", %isfunction, %isglobal) ""; + - to ignore the enumitems in a given class: + + %rename("$ignore", %isenumitem, %classname="MyClass") ""; + */ @@ -250,6 +254,13 @@ static int NAME(TYPE x) { %define %ismember match$parentNode$nodeType="class" %enddef %define %isglobal notmatch$parentNode$nodeType="class" %enddef +%define %innamespace match$parentNode$nodeType="namespace" %enddef + +%define %ispublic match$access="public" %enddef +%define %isprotected match$access="protected" %enddef +%define %isprivate match$access="public" %enddef + +%define %classname %ismember,match$parentNode$name %enddef /* ----------------------------------------------------------------------------- * Include all the warnings labels and macros