Expand special variables in cxxcode typemap
This makes the typemap much more useful, as it can now reference the name of the class it is being expanded for and the type of the C pointer used by it (in principle, the latter could be recovered by using decltype(), but this results in rather verbose code inside static methods where a dummy pointer to the type must be constructed first, so using another special variable seems like a simpler solution).
This commit is contained in:
parent
f9b4ea2841
commit
8d9f3e88b2
2 changed files with 5 additions and 2 deletions
|
|
@ -498,7 +498,7 @@ area: 7.068583
|
|||
</tr>
|
||||
<tr>
|
||||
<td><tt>cxxcode</tt></td>
|
||||
<td>May contain arbitrary code that will be injected in the declaration of the C++ wrapper class corresponding to the given type. Ignored for non-class types.
|
||||
<td>May contain arbitrary code that will be injected in the declaration of the C++ wrapper class corresponding to the given type. Ignored for non-class types. The special variable <tt>$cxxclassname</tt> is replaced with the name of the class inside this typemap expansion and <tt>$cclassptrname</tt> is replaced with the name of the pointer type used to represent the class in C wrapper functions.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue