From cebbfef29d70efa8e2a0fa693bf64faca79e493a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 4 Jul 2006 21:13:21 +0000 Subject: [PATCH] feature doc refinement git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9193 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Doc/Manual/Customization.html | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/Doc/Manual/Customization.html b/Doc/Manual/Customization.html index f72b6f21b..8b9168a71 100644 --- a/Doc/Manual/Customization.html +++ b/Doc/Manual/Customization.html @@ -707,7 +707,12 @@ The following are all equivalent:

The syntax in the first variation will generate the { } delimiters used whereas the other variations will not. -The %feature directive also accepts XML style attributes in the same way that typemaps will. +

+ +

Feature attributes

+ +

+The %feature directive also accepts XML style attributes in the same way that typemaps do. Any number of attributes can be specified. The following is the generic syntax for features:

@@ -754,11 +759,11 @@ and the feature value should be either 1 to enable or 0 to dis
-%feature("name")          // enables feature
-%feature("name", "1")     // enables feature
-%feature("name", "x")     // enables feature
-%feature("name", "0")     // disables feature
-%feature("name", "")      // clears feature
+%feature("featurename")          // enables feature
+%feature("featurename", "1")     // enables feature
+%feature("featurename", "x")     // enables feature
+%feature("featurename", "0")     // disables feature
+%feature("featurename", "")      // clears feature
 
@@ -825,6 +830,22 @@ int blue; // mutable +

+As hinted above for %immutable, most feature flags can also be specified via alternative syntax. The alternative syntax is just a macro +in the swig.swg Library file. The following shows the alternative syntax for the imaginary featurename feature: +

+ +
+
+%featurename       // equivalent to %feature("featurename", "1") ie enables feature
+%nofeaturename     // equivalent to %feature("featurename", "0") ie disables feature
+%clearfeaturename  // equivalent to %feature("featurename", "")  ie clears feature
+
+
+ +

+The concept of clearing features is discussed next. +

11.3.2 Clearing features