diff --git a/Doc/Manual/Contents.html b/Doc/Manual/Contents.html index 7cae25e7f..105bbcf7e 100644 --- a/Doc/Manual/Contents.html +++ b/Doc/Manual/Contents.html @@ -156,6 +156,7 @@
will capitalize the names of all the enum elements but not change the case of -the other declarations. Similarly, %$isclass, %$isfunction +the other declarations. Similarly, %$isclass, %$isfunction, +%$isconstructor, %$isunion, %$istemplate, and %$isvariable can be used. Many other checks are possible and this -documentation is not exhaustive, see "%rename predicates" section of +documentation is not exhaustive, see the "%rename predicates" section in swig.swg for the full list of supported match expressions.
@@ -2023,9 +2025,13 @@ declaration name directly can be preferable and can also be done using %rename("$ignore", regextarget=1) "Old$"; + +Notice that the check is done only against the name of the declaration itself, if you need to match the full name of a C++ declaration you must use fullname attribute: +
+
%rename("$ignore", regextarget=1, fullname=1) "NameSpace::ClassName::.*Old$";
@@ -2050,6 +2056,48 @@ wrap C++ overloaded functions and methods or C++ methods which use default argum
+5.4.7.4 Ignoring everything then wrapping a few selected symbols
+
+
+
+Using the techniques described above it is possible to ignore everything in a header and then
+selectively wrap a few chosen methods or classes. For example, consider a header, myheader.h
+which has many classes in it and just the one class called Star is wanted within this header,
+the following approach could be taken:
+
+
+
+
+%ignore ""; // Ignore everything
+
+// Unignore chosen class 'Star'
+%rename("%s") Star;
+
+// As the ignore everything will include the constructor, destructor, methods etc
+// in the class, these have to be explicitly unignored too:
+%rename("%s") Star::Star;
+%rename("%s") Star::~Star;
+%rename("%s") Star::shine; // named method
+
+%include "myheader.h"
+
+
+
+
+Another approach which might be more suitable as it does not require naming all the methods in the
+chosen class is to begin by ignoring just the classes. This does not add an explicit ignore to any
+members of the class, so when the chosen class is unignored, all of its methods will be wrapped.
+
+
+
+
+%rename($ignore, %$isclass) ""; // Only ignore all classes
+%rename("%s") Star; // Unignore 'Star'
+%include "myheader.h"
+
+
+
+
5.4.8 Default/optional arguments