| 1 |
<html><head> |
|---|
| 2 |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> |
|---|
| 3 |
<meta content="text/javascript" http-equiv="content-script-type"> |
|---|
| 4 |
<title>pyd.ftype</title> |
|---|
| 5 |
<link rel="stylesheet" type="text/css" href="candydoc/style.css"> |
|---|
| 6 |
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="candydoc/ie56hack.css"><![endif]--> |
|---|
| 7 |
<script language="JavaScript" src="candydoc/util.js" type="text/javascript"></script> |
|---|
| 8 |
<script language="JavaScript" src="candydoc/tree.js" type="text/javascript"></script> |
|---|
| 9 |
<script language="JavaScript" src="candydoc/explorer.js" type="text/javascript"></script> |
|---|
| 10 |
</head><body> |
|---|
| 11 |
<div id="tabarea"></div><div id="explorerclient"></div> |
|---|
| 12 |
<div id="content"><script>explorer.initialize("pyd.ftype");</script> |
|---|
| 13 |
<table class="content"> |
|---|
| 14 |
<tr><td id="docbody"><h1>pyd.ftype</h1><!-- Generated by Ddoc from pyd\ftype.d --> |
|---|
| 15 |
This module contains templates for inferring the number of arguments, |
|---|
| 16 |
the return type, and argument types of an arbitrary function pointer. |
|---|
| 17 |
<br><br> |
|---|
| 18 |
Portions of this module were automatically generated by Python modules. |
|---|
| 19 |
|
|---|
| 20 |
<br><br> |
|---|
| 21 |
<b>Authors:</b><br> |
|---|
| 22 |
Daniel Keep, Tomasz Stachowiak |
|---|
| 23 |
<br><br> |
|---|
| 24 |
<b>Date:</b><br> |
|---|
| 25 |
Sat Jul 1 22:14:02 2006 |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
<br><br> |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
<script>explorer.outline.incSymbolLevel();</script> |
|---|
| 32 |
<dl> |
|---|
| 33 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 34 |
<dt><span class="decl">template |
|---|
| 35 |
<span class="currsymbol">NumberOfArgs</span> |
|---|
| 36 |
<script>explorer.outline.addDecl('NumberOfArgs');</script> |
|---|
| 37 |
|
|---|
| 38 |
(Tf)</span></dt> |
|---|
| 39 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
<dd>Derives the number of arguments the passed function type accepts. It only |
|---|
| 43 |
works on functions with 10 or fewer arguments. |
|---|
| 44 |
|
|---|
| 45 |
<br><br> |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
<script>explorer.outline.incSymbolLevel();</script> |
|---|
| 49 |
<dl></dl> |
|---|
| 50 |
<script>explorer.outline.decSymbolLevel();</script> |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
</dd> |
|---|
| 54 |
|
|---|
| 55 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 56 |
<dt><span class="decl">template |
|---|
| 57 |
<span class="currsymbol">ReturnType</span> |
|---|
| 58 |
<script>explorer.outline.addDecl('ReturnType');</script> |
|---|
| 59 |
|
|---|
| 60 |
(T)</span></dt> |
|---|
| 61 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
<dd>Derives the return type of the passed function type. |
|---|
| 65 |
|
|---|
| 66 |
<br><br> |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
<script>explorer.outline.incSymbolLevel();</script> |
|---|
| 70 |
<dl></dl> |
|---|
| 71 |
<script>explorer.outline.decSymbolLevel();</script> |
|---|
| 72 |
|
|---|
| 73 |
|
|---|
| 74 |
</dd> |
|---|
| 75 |
|
|---|
| 76 |
<script>explorer.outline.writeEnabled = true;</script> |
|---|
| 77 |
<dt><span class="decl">template |
|---|
| 78 |
<span class="currsymbol">ArgType</span> |
|---|
| 79 |
<script>explorer.outline.addDecl('ArgType');</script> |
|---|
| 80 |
|
|---|
| 81 |
(Tf,uint n)</span></dt> |
|---|
| 82 |
<script>explorer.outline.writeEnabled = false;</script> |
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
<dd>Derives the type of an individual argument of function Tf. |
|---|
| 86 |
<br><br> |
|---|
| 87 |
<b>Params:</b><br> |
|---|
| 88 |
<table><tr> |
|---|
| 89 |
<td nowrap valign="top" style="padding-right: 8px">Tf</td> |
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
<td>A function pointer type</td></tr> |
|---|
| 93 |
<tr> |
|---|
| 94 |
<td nowrap valign="top" style="padding-right: 8px">n</td> |
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 |
<td>The 1-indexed function argument to get the type of, e.g.: |
|---|
| 98 |
<pre class="d_code">int func(int, char, real); |
|---|
| 99 |
static assert( is(char == ArgType(&func, 2)) );</pre></td></tr> |
|---|
| 100 |
</table><br> |
|---|
| 101 |
|
|---|
| 102 |
|
|---|
| 103 |
<script>explorer.outline.incSymbolLevel();</script> |
|---|
| 104 |
<dl></dl> |
|---|
| 105 |
<script>explorer.outline.decSymbolLevel();</script> |
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 |
</dd> |
|---|
| 109 |
</dl> |
|---|
| 110 |
<script>explorer.outline.decSymbolLevel();</script> |
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 |
</td></tr> |
|---|
| 114 |
<tr><td id="docfooter"> |
|---|
| 115 |
Page was generated with |
|---|
| 116 |
<img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> |
|---|
| 117 |
on Sat Jul 1 22:14:02 2006 |
|---|
| 118 |
|
|---|
| 119 |
</td></tr> |
|---|
| 120 |
</table> |
|---|
| 121 |
</div> |
|---|
| 122 |
<script> |
|---|
| 123 |
explorer.packageExplorer.addModule("pyd.class_wrap"); |
|---|
| 124 |
explorer.packageExplorer.addModule("pyd.ctor_wrap"); |
|---|
| 125 |
explorer.packageExplorer.addModule("pyd.def"); |
|---|
| 126 |
explorer.packageExplorer.addModule("pyd.dg_convert"); |
|---|
| 127 |
explorer.packageExplorer.addModule("pyd.exception"); |
|---|
| 128 |
explorer.packageExplorer.addModule("pyd.ftype"); |
|---|
| 129 |
explorer.packageExplorer.addModule("pyd.make_object"); |
|---|
| 130 |
explorer.packageExplorer.addModule("pyd.object"); |
|---|
| 131 |
explorer.packageExplorer.addModule("pyd.pyd");</script> |
|---|
| 132 |
</body></html> |
|---|