From: William F. <wsf...@us...> - 2006-07-04 21:13:24
|
Update of /cvsroot/swig/SWIG/Doc/Manual In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21676/Doc/Manual Modified Files: Customization.html Log Message: feature doc refinement Index: Customization.html =================================================================== RCS file: /cvsroot/swig/SWIG/Doc/Manual/Customization.html,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Customization.html 3 Feb 2006 22:06:11 -0000 1.22 --- Customization.html 4 Jul 2006 21:13:21 -0000 1.23 *************** *** 708,712 **** <p> The syntax in the first variation will generate the <tt>{ }</tt> delimiters used whereas the other variations will not. ! The <tt>%feature</tt> directive also accepts XML style attributes in the same way that typemaps will. Any number of attributes can be specified. The following is the generic syntax for features: --- 708,717 ---- <p> The syntax in the first variation will generate the <tt>{ }</tt> delimiters used whereas the other variations will not. ! </p> ! ! <H3><a name="Customization_feature_attributes"></a>Feature attributes</H3> ! ! <p> ! The <tt>%feature</tt> 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: *************** *** 755,763 **** <div class="code"> <pre> ! %feature("name") // enables feature ! %feature("name", "1") // enables feature ! %feature("name", "x") // enables feature ! %feature("name", "0") // disables feature ! %feature("name", "") // clears feature </pre> </div> --- 760,768 ---- <div class="code"> <pre> ! %feature("featurename") // enables feature ! %feature("featurename", "1") // enables feature ! %feature("featurename", "x") // enables feature ! %feature("featurename", "0") // disables feature ! %feature("featurename", "") // clears feature </pre> </div> *************** *** 826,829 **** --- 831,850 ---- </div> + <p> + As hinted above for <tt>%immutable</tt>, most feature flags can also be specified via alternative syntax. The alternative syntax is just a macro + in the <tt>swig.swg</tt> Library file. The following shows the alternative syntax for the imaginary <tt>featurename</tt> feature: + </p> + + <div class="code"> + <pre> + %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 + </pre> + </div> + + <p> + The concept of clearing features is discussed next. + </p> <H3><a name="Customization_clearing_features"></a>11.3.2 Clearing features</H3> |