Talk about namespaces and unignoring
It was not obvious to at least one person that namespaces need to be unignored just like classes and methods. Add an explicit reference to that in the docs. Also add something to unignore all classes in the example that shows how to ignore all classes, as that might not be obvious. Fixes #193
This commit is contained in:
parent
4949b2e760
commit
97b4cccbbd
1 changed files with 16 additions and 0 deletions
|
|
@ -2255,6 +2255,21 @@ the following approach could be taken:
|
|||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
If <tt>Star</tt> was in the <tt>Galaxy</tt> namespace, you would need
|
||||
to unignore the namespace, too, and add the namespace to all the
|
||||
renames:
|
||||
</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
%rename("%s") Galaxy;
|
||||
%rename("%s") Galaxy::Star;
|
||||
%rename("%s") Galaxy::Star::Star;
|
||||
...
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
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
|
||||
|
|
@ -2266,6 +2281,7 @@ members of the class, so when the chosen class is unignored, all of its methods
|
|||
%rename($ignore, %$isclass) ""; // Only ignore all classes
|
||||
%rename("%s") Star; // Unignore 'Star'
|
||||
%include "myheader.h"
|
||||
%rename("%s", %$isclass) ""; // Stop ignoring all classes
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue