Changeset 25
- Timestamp:
- 07/02/06 01:27:18 (2 years ago)
- Files:
-
- trunk/MANIFEST (deleted)
- trunk/infrastructure/pyd/class_wrap.d (modified) (13 diffs)
- trunk/infrastructure/pyd/ctor_wrap.d (modified) (2 diffs)
- trunk/infrastructure/pyd/def.d (modified) (1 diff)
- trunk/infrastructure/pyd/dg_convert.d (modified) (1 diff)
- trunk/infrastructure/pyd/doc/class_wrap.html (modified) (2 diffs)
- trunk/infrastructure/pyd/doc/ctor_wrap.html (modified) (2 diffs)
- trunk/infrastructure/pyd/doc/def.html (modified) (2 diffs)
- trunk/infrastructure/pyd/doc/dg_convert.html (modified) (2 diffs)
- trunk/infrastructure/pyd/doc/exception.html (modified) (1 diff)
- trunk/infrastructure/pyd/doc/ftype.html (modified) (2 diffs)
- trunk/infrastructure/pyd/doc/make_object.html (modified) (1 diff)
- trunk/infrastructure/pyd/doc/object.html (modified) (1 diff)
- trunk/infrastructure/pyd/doc/pyd.html (modified) (1 diff)
- trunk/infrastructure/pyd/wiki_doc/class_wrap.html (modified) (1 diff)
- trunk/infrastructure/pyd/wiki_doc/ctor_wrap.html (modified) (1 diff)
- trunk/infrastructure/pyd/wiki_doc/def.html (modified) (1 diff)
- trunk/infrastructure/pyd/wiki_doc/dg_convert.html (modified) (1 diff)
- trunk/infrastructure/pyd/wiki_doc/ftype.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/infrastructure/pyd/class_wrap.d
r24 r25 29 29 private import std.string; 30 30 31 // The class object, a subtype of PyObject31 /// The class object, a subtype of PyObject 32 32 template wrapped_class_object(T) { 33 33 extern(C) … … 38 38 } 39 39 40 // The type object, an instance of PyType_Type40 /// 41 41 template wrapped_class_type(T) { 42 /// The type object, an instance of PyType_Type 42 43 static PyTypeObject wrapped_class_type = { 43 44 1, … … 92 93 } 93 94 94 // Various wrapped methods95 /// Various wrapped methods 95 96 template wrapped_methods(T) { 96 97 alias wrapped_class_object!(T) wrap_object; 98 /// The generic "__new__" method 97 99 extern(C) 98 100 PyObject* wrapped_new(PyTypeObject* type, PyObject* args, PyObject* kwds) { … … 107 109 } 108 110 111 /// The generic dealloc method. 109 112 extern(C) 110 113 void wrapped_dealloc(PyObject* _self) { … … 119 122 } 120 123 124 /// The default repr method calls the class's toString. 121 125 extern(C) 122 126 PyObject* wrapped_repr(PyObject* _self) { … … 127 131 } 128 132 133 /// 129 134 template wrapped_init(T) { 130 135 alias wrapped_class_object!(T) wrap_object; 136 /// The default _init method calls the class's zero-argument constructor. 131 137 extern(C) 132 138 int init(PyObject* self, PyObject* args, PyObject* kwds) { … … 157 163 } 158 164 165 /// 159 166 template wrapped_get(T, alias Fn) { 167 /// A generic wrapper around a "getter" property. 160 168 extern(C) 161 169 PyObject* func(PyObject* self, void* closure) { … … 164 172 } 165 173 166 private import std.stdio; 167 174 /// 168 175 template wrapped_set(T, alias Fn) { 176 /// A generic wrapper around a "setter" property. 169 177 extern(C) 170 178 int func(PyObject* self, PyObject* value, void* closure) { … … 189 197 } 190 198 191 // A useful check for whether a given class has been wrapped. Mainly used by 192 // the conversion functions (see make_object.d), but possibly useful elsewhere. 199 /** 200 * A useful check for whether a given class has been wrapped. Mainly used by 201 * the conversion functions (see make_object.d), but possibly useful elsewhere. 202 */ 193 203 template is_wrapped(T) { 194 204 bool is_wrapped = false; … … 209 219 } 210 220 211 // This struct is returned by wrap_class. Its member functions are the primary 212 // way of wrapping the specific parts of the class. Note that the struct has no 213 // members. The only information it carries are its template arguments. 221 /** 222 * This struct wraps a D class. Its member functions are the primary way of 223 * wrapping the specific parts of the class. 224 */ 214 225 template wrapped_class(char[] classname, T) { 215 226 struct wrapped_class { 216 227 static const char[] _name = classname; 217 228 T t = null; 229 /** 230 * Wraps a member function of the class. 231 * 232 * Params: 233 * name = The name of the function as it will appear in Python. 234 * fn = The member function to wrap. 235 * MIN_ARGS = The minimum number of arguments this function can accept. 236 * fn_t = The type of the function. It is only useful to specify this 237 * if more than one function has the same name as this one. 238 */ 218 239 template def(char[] name, alias fn, uint MIN_ARGS = NumberOfArgs!(typeof(&fn)), fn_t=typeof(&fn)) { 219 void def() {240 static void def() { 220 241 static PyMethodDef empty = { null, null, 0, null }; 221 242 wrapped_method_list!(T)[length-1].ml_name = name ~ \0; … … 232 253 } 233 254 255 /** 256 * Wraps a property of the class. 257 * 258 * Params: 259 * name = The name of the property as it will appear in Python. 260 * fn = The property to wrap. 261 * RO = Whether this is a read-only property. 262 */ 234 263 template prop(char[] name, alias fn, bool RO=false) { 235 void prop() {264 static void prop() { 236 265 static PyGetSetDef empty = { null, null, null, null, null }; 237 266 wrapped_prop_list!(T)[length-1].name = name ~ \0; … … 252 281 } 253 282 283 /** 284 * Wraps the constructors of the class. 285 * 286 * This template takes a series of specializations of the ctor template 287 * (see ctor_wrap.d), each of which describes a different constructor 288 * that the class supports. The default constructor need not be 289 * specified, and will always be available if the class supports it. 290 * 291 * Bugs: 292 * This currently does not support having multiple constructors with 293 * the same number of arguments. 294 */ 254 295 template init(alias C1=undefined, alias C2=undefined, alias C3=undefined, alias C4=undefined, alias C5=undefined, alias C6=undefined, alias C7=undefined, alias C8=undefined, alias C9=undefined, alias C10=undefined) { 255 void init() {296 static void init() { 256 297 wrapped_class_type!(T).tp_init = 257 298 &wrapped_ctors!(T, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10).init_func; … … 261 302 } 262 303 304 /** 305 * Finalize the wrapping of the class. It is neccessary to call this after all 306 * calls to the wrapped_class member functions. 307 */ 263 308 void finalize_class(CLS) (CLS cls) { 264 309 alias typeof(cls.t) T; trunk/infrastructure/pyd/ctor_wrap.d
r24 r25 27 27 private import pyd.make_object; 28 28 29 // This template defines the footprint of an individual constructor. 29 /** 30 * This template defines the footprint of an individual constructor. 31 */ 30 32 template ctor(T1=void, T2=void, T3=void, T4=void, T5=void, T6=void, T7=void, T8=void, T9=void, T10=void) { 31 33 static if (!is(T10 == void)) … … 182 184 } 183 185 184 // This template accepts a list of "ctor" templates and uses them to wrap a Py hton __init__ function.186 // This template accepts a list of "ctor" templates and uses them to wrap a Python __init__ function. 185 187 template wrapped_ctors(T, alias C1, alias C2, alias C3, alias C4, alias C5, alias C6, alias C7, alias C8, alias C9, alias C10) { 186 188 alias wrapped_class_object!(T) wrap_object; trunk/infrastructure/pyd/def.d
r24 r25 52 52 * For use with functions with default arguments. Defaults to 53 53 * the maximum number of arguments this function supports. 54 * fn_t = The function type of the function to wrap. This must be 55 * specified if more than one function shares the same name, 56 * otherwise the first one defined lexically will be used. 54 57 * 55 58 * Examples: trunk/infrastructure/pyd/dg_convert.d
r24 r25 20 20 SOFTWARE. 21 21 */ 22 23 /** 24 * This module contains some more or less dirty hacks for converting between 25 * function and delegate types. Its contents are strictly for internal use 26 * within Pyd. 27 */ 22 28 module pyd.dg_convert; 23 29 trunk/infrastructure/pyd/doc/class_wrap.html
r24 r25 17 17 18 18 <script>explorer.outline.incSymbolLevel();</script> 19 <dl> 20 <script>explorer.outline.writeEnabled = true;</script> 21 <dt><span class="decl">struct 22 <span class="currsymbol"> 23 <span class="currsymbol">wrapped_class_object</span> 24 <script>explorer.outline.addDecl('wrapped_class_object');</script> 25 26 </span> 27 <script>explorer.outline.addDecl(' 28 <span class="currsymbol">wrapped_class_object</span> 29 <script>explorer.outline.addDecl('wrapped_class_object');</script> 30 31 ');</script> 32 33 ; 34 </span></dt> 35 <script>explorer.outline.writeEnabled = false;</script> 36 37 38 <dd>The class object, a subtype of PyObject 39 <br><br> 40 41 42 <script>explorer.outline.incSymbolLevel();</script> 19 43 <dl></dl> 44 <script>explorer.outline.decSymbolLevel();</script> 45 46 47 </dd> 48 49 <script>explorer.outline.writeEnabled = true;</script> 50 <dt><span class="decl">template 51 <span class="currsymbol">wrapped_class_type</span> 52 <script>explorer.outline.addDecl('wrapped_class_type');</script> 53 54 (T)</span></dt> 55 <script>explorer.outline.writeEnabled = false;</script> 56 57 58 <dd><br><br> 59 60 <script>explorer.outline.incSymbolLevel();</script> 61 <dl> 62 <script>explorer.outline.writeEnabled = true;</script> 63 <dt><span class="decl">PyTypeObject 64 <span class="currsymbol">wrapped_class_type</span> 65 <script>explorer.outline.addDecl('wrapped_class_type');</script> 66 67 ; 68 </span></dt> 69 <script>explorer.outline.writeEnabled = false;</script> 70 71 72 <dd>The type object, an instance of PyType_Type 73 <br><br> 74 75 </dd> 76 </dl> 77 <script>explorer.outline.decSymbolLevel();</script> 78 79 80 </dd> 81 82 <script>explorer.outline.writeEnabled = true;</script> 83 <dt><span class="decl">template 84 <span class="currsymbol">wrapped_methods</span> 85 <script>explorer.outline.addDecl('wrapped_methods');</script> 86 87 (T)</span></dt> 88 <script>explorer.outline.writeEnabled = false;</script> 89 90 91 <dd>Various wrapped methods 92 <br><br> 93 94 95 <script>explorer.outline.incSymbolLevel();</script> 96 <dl> 97 <script>explorer.outline.writeEnabled = true;</script> 98 <dt><span class="decl">PyObject* 99 <span class="currsymbol">wrapped_new</span> 100 <script>explorer.outline.addDecl('wrapped_new');</script> 101 102 (PyTypeObject* <span class="funcparam">type</span>, PyObject* <span class="funcparam">args</span>, PyObject* <span class="funcparam">kwds</span>); 103 </span></dt> 104 <script>explorer.outline.writeEnabled = false;</script> 105 106 107 <dd>The generic "_new__" method 108 <br><br> 109 110 </dd> 111 112 <script>explorer.outline.writeEnabled = true;</script> 113 <dt><span class="decl">void 114 <span class="currsymbol">wrapped_dealloc</span> 115 <script>explorer.outline.addDecl('wrapped_dealloc');</script> 116 117 (PyObject* <span class="funcparam">_self</span>); 118 </span></dt> 119 <script>explorer.outline.writeEnabled = false;</script> 120 121 122 <dd>The generic dealloc method. 123 <br><br> 124 125 </dd> 126 127 <script>explorer.outline.writeEnabled = true;</script> 128 <dt><span class="decl">PyObject* 129 <span class="currsymbol">wrapped_repr</span> 130 <script>explorer.outline.addDecl('wrapped_repr');</script> 131 132 (PyObject* <span class="funcparam">_self</span>); 133 </span></dt> 134 <script>explorer.outline.writeEnabled = false;</script> 135 136 137 <dd>The default repr method calls the class's toString. 138 <br><br> 139 140 </dd> 141 </dl> 142 <script>explorer.outline.decSymbolLevel();</script> 143 144 145 </dd> 146 147 <script>explorer.outline.writeEnabled = true;</script> 148 <dt><span class="decl">template 149 <span class="currsymbol">wrapped_init</span> 150 <script>explorer.outline.addDecl('wrapped_init');</script> 151 152 (T)</span></dt> 153 <script>explorer.outline.writeEnabled = false;</script> 154 155 156 <dd><br><br> 157 158 <script>explorer.outline.incSymbolLevel();</script> 159 <dl> 160 <script>explorer.outline.writeEnabled = true;</script> 161 <dt><span class="decl">int 162 <span class="currsymbol">init</span> 163 <script>explorer.outline.addDecl('init');</script> 164 165 (PyObject* <span class="funcparam">self</span>, PyObject* <span class="funcparam">args</span>, PyObject* <span class="funcparam">kwds</span>); 166 </span></dt> 167 <script>explorer.outline.writeEnabled = false;</script> 168 169 170 <dd>The default init method calls the class's zero-argument constructor. 171 <br><br> 172 173 </dd> 174 </dl> 175 <script>explorer.outline.decSymbolLevel();</script> 176 177 178 </dd> 179 180 <script>explorer.outline.writeEnabled = true;</script> 181 <dt><span class="decl">template 182 <span class="currsymbol">wrapped_get</span> 183 <script>explorer.outline.addDecl('wrapped_get');</script> 184 185 (T,alias Fn)</span></dt> 186 <script>explorer.outline.writeEnabled = false;</script> 187 188 189 <dd><br><br> 190 191 <script>explorer.outline.incSymbolLevel();</script> 192 <dl> 193 <script>explorer.outline.writeEnabled = true;</script> 194 <dt><span class="decl">PyObject* 195 <span class="currsymbol">func</span> 196 <script>explorer.outline.addDecl('func');</script> 197 198 (PyObject* <span class="funcparam">self</span>, void* <span class="funcparam">closure</span>); 199 </span></dt> 200 <script>explorer.outline.writeEnabled = false;</script> 201 202 203 <dd>A generic wrapper around a "getter" property. 204 <br><br> 205 206 </dd> 207 </dl> 208 <script>explorer.outline.decSymbolLevel();</script> 209 210 211 </dd> 212 213 <script>explorer.outline.writeEnabled = true;</script> 214 <dt><span class="decl">template 215 <span class="currsymbol">wrapped_set</span> 216 <script>explorer.outline.addDecl('wrapped_set');</script> 217 218 (T,alias Fn)</span></dt> 219 <script>explorer.outline.writeEnabled = false;</script> 220 221 222 <dd><br><br> 223 224 <script>explorer.outline.incSymbolLevel();</script> 225 <dl> 226 <script>explorer.outline.writeEnabled = true;</script> 227 <dt><span class="decl">int 228 <span class="currsymbol">func</span> 229 <script>explorer.outline.addDecl('func');</script> 230 231 (PyObject* <span class="funcparam">self</span>, PyObject* <span class="funcparam">value</span>, void* <span class="funcparam">closure</span>); 232 </span></dt> 233 <script>explorer.outline.writeEnabled = false;</script> 234 235 236 <dd>A generic wrapper around a "setter" property. 237 <br><br> 238 239 </dd> 240 </dl> 241 <script>explorer.outline.decSymbolLevel();</script> 242 243 244 </dd> 245 246 <script>explorer.outline.writeEnabled = true;</script> 247 <dt><span class="decl">template 248 <span class="currsymbol">is_wrapped</span> 249 <script>explorer.outline.addDecl('is_wrapped');</script> 250 251 (T)</span></dt> 252 <script>explorer.outline.writeEnabled = false;</script> 253 254 255 <dd>A useful check for whether a given class has been wrapped. Mainly used by 256 the conversion functions (see make_object.d), but possibly useful elsewhere. 257 258 <br><br> 259 260 261 <script>explorer.outline.incSymbolLevel();</script> 262 <dl></dl> 263 <script>explorer.outline.decSymbolLevel();</script> 264 265 266 </dd> 267 268 <script>explorer.outline.writeEnabled = true;</script> 269 <dt><span class="decl">struct 270 <span class="currsymbol"> 271 <span class="currsymbol">wrapped_class</span> 272 <script>explorer.outline.addDecl('wrapped_class');</script> 273 274 </span> 275 <script>explorer.outline.addDecl(' 276 <span class="currsymbol">wrapped_class</span> 277 <script>explorer.outline.addDecl('wrapped_class');</script> 278 279 ');</script> 280 281 ; 282 </span></dt> 283 <script>explorer.outline.writeEnabled = false;</script> 284 285 286 <dd>This struct wraps a D class. Its member functions are the primary way of 287 wrapping the specific parts of the class. 288 289 <br><br> 290 291 292 <script>explorer.outline.incSymbolLevel();</script> 293 <dl> 294 <script>explorer.outline.writeEnabled = true;</script> 295 <dt><span class="decl">template 296 <span class="currsymbol">def</span> 297 <script>explorer.outline.addDecl('def');</script> 298 299 (char[] name,alias fn,uint MIN_ARGS = NumberOfArgs!(typeof(&fn)),fn_t = typeof(&fn))</span></dt> 300 <script>explorer.outline.writeEnabled = false;</script> 301 302 303 <dd>Wraps a member function of the class. 304 <br><br> 305 <b>Params:</b><br> 306 <table><tr> 307 <td nowrap valign="top" style="padding-right: 8px">name</td> 308 309 310 <td>The name of the function as it will appear in Python.</td></tr> 311 <tr> 312 <td nowrap valign="top" style="padding-right: 8px">fn</td> 313 314 315 <td>The member function to wrap.</td></tr> 316 <tr> 317 <td nowrap valign="top" style="padding-right: 8px">MIN_ARGS</td> 318 319 320 <td>The minimum number of arguments this function can accept.</td></tr> 321 <tr> 322 <td nowrap valign="top" style="padding-right: 8px">fn_t</td> 323 324 325 <td>The type of the function. It is only useful to specify this 326 if more than one function has the same name as this one.</td></tr> 327 </table><br> 328 329 330 <script>explorer.outline.incSymbolLevel();</script> 331 <dl></dl> 332 <script>explorer.outline.decSymbolLevel();</script> 333 334 335 </dd> 336 337 <script>explorer.outline.writeEnabled = true;</script> 338 <dt><span class="decl">template 339 <span class="currsymbol">prop</span> 340 <script>explorer.outline.addDecl('prop');</script> 341 342 (char[] name,alias fn,bool RO = false)</span></dt> 343 <script>explorer.outline.writeEnabled = false;</script> 344 345 346 <dd>Wraps a property of the class. 347 <br><br> 348 <b>Params:</b><br> 349 <table><tr> 350 <td nowrap valign="top" style="padding-right: 8px">name</td> 351 352 353 <td>The name of the property as it will appear in Python.</td></tr> 354 <tr> 355 <td nowrap valign="top" style="padding-right: 8px">fn</td> 356 357 358 <td>The property to wrap.</td></tr> 359 <tr> 360 <td nowrap valign="top" style="padding-right: 8px">RO</td> 361 362 363 <td>Whether this is a read-only property.</td></tr> 364 </table><br> 365 366 367 <script>explorer.outline.incSymbolLevel();</script> 368 <dl></dl> 369 <script>explorer.outline.decSymbolLevel();</script> 370 371 372 </dd> 373 374 <script>explorer.outline.writeEnabled = true;</script> 375 <dt><span class="decl">template 376 <span class="currsymbol">init</span> 377 <script>explorer.outline.addDecl('init');</script> 378 379 (alias C1 = undefined,alias C2 = undefined,alias C3 = undefined,alias C4 = undefined,alias C5 = undefined,alias C6 = undefined,alias C7 = undefined,alias C8 = undefined,alias C9 = undefined,alias C10 = undefined)</span></dt> 380 <script>explorer.outline.writeEnabled = false;</script> 381 382 383 <dd>Wraps the constructors of the class. 384 <br><br> 385 This template takes a series of specializations of the ctor template 386 (see ctor_wrap.d), each of which describes a different constructor 387 that the class supports. The default constructor need not be 388 specified, and will always be available if the class supports it. 389 390 <br><br> 391 <font color=red>BUGS:</font><br> 392 This currently does not support having multiple constructors with 393 the same number of arguments. 394 395 <br><br> 396 397 398 <script>explorer.outline.incSymbolLevel();</script> 399 <dl></dl> 400 <script>explorer.outline.decSymbolLevel();</script> 401 402 403 </dd> 404 </dl> 405 <script>explorer.outline.decSymbolLevel();</script> 406 407 408 </dd> 409 </dl> 20 410 <script>explorer.outline.decSymbolLevel();</script> 21 411 … … 25 415 Page was generated with 26 416 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 27 on Sat Jul 1 17:20:372006417 on Sat Jul 1 22:14:02 2006 28 418 29 419 </td></tr> trunk/infrastructure/pyd/doc/ctor_wrap.html
r24 r25 17 17 18 18 <script>explorer.outline.incSymbolLevel();</script> 19 <dl> 20 <script>explorer.outline.writeEnabled = true;</script> 21 <dt><span class="decl">template 22 <span class="currsymbol">ctor</span> 23 <script>explorer.outline.addDecl('ctor');</script> 24 25 (T1 = void,T2 = void,T3 = void,T4 = void,T5 = void,T6 = void,T7 = void,T8 = void,T9 = void,T10 = void)</span></dt> 26 <script>explorer.outline.writeEnabled = false;</script> 27 28 29 <dd>This template defines the footprint of an individual constructor. 30 31 <br><br> 32 33 34 <script>explorer.outline.incSymbolLevel();</script> 19 35 <dl></dl> 36 <script>explorer.outline.decSymbolLevel();</script> 37 38 39 </dd> 40 </dl> 20 41 <script>explorer.outline.decSymbolLevel();</script> 21 42 … … 25 46 Page was generated with 26 47 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 27 on Sat Jul 1 17:20:37200648 on Sat Jul 1 22:14:02 2006 28 49 29 50 </td></tr> trunk/infrastructure/pyd/doc/def.html
r24 r25 47 47 For use with functions with default arguments. Defaults to 48 48 the maximum number of arguments this function supports.</td></tr> 49 <tr> 50 <td nowrap valign="top" style="padding-right: 8px">fn_t</td> 51 52 53 <td>The function type of the function to wrap. This must be 54 specified if more than one function shares the same name, 55 otherwise the first one defined lexically will be used.</td></tr> 49 56 </table><br> 50 57 <b>Examples:</b><br> … … 100 107 Page was generated with 101 108 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 102 on Sat Jul 1 17:20:372006109 on Sat Jul 1 22:14:02 2006 103 110 104 111 </td></tr> trunk/infrastructure/pyd/doc/dg_convert.html
r24 r25 14 14 <table class="content"> 15 15 <tr><td id="docbody"><h1>pyd.dg_convert</h1><!-- Generated by Ddoc from pyd\dg_convert.d --> 16 This module contains some more or less dirty hacks for converting between 17 function and delegate types. Its contents are strictly for internal use 18 within Pyd. 19 16 20 <br><br> 21 17 22 18 23 <script>explorer.outline.incSymbolLevel();</script> … … 46 51 Page was generated with 47 52 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 48 on Sat Jul 1 17:20:37200653 on Sat Jul 1 22:14:02 2006 49 54 50 55 </td></tr> trunk/infrastructure/pyd/doc/exception.html
r24 r25 68 68 Page was generated with 69 69 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 70 on Sat Jul 1 17:20:37200670 on Sat Jul 1 22:14:02 2006 71 71 72 72 </td></tr> trunk/infrastructure/pyd/doc/ftype.html
r24 r25 24 24 <br><br> 25 25 <b>Date:</b><br> 26 Sat Jul 1 17:20:37200626 Sat Jul 1 22:14:02 2006 27 27 28 28 … … 116 116 Page was generated with 117 117 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 118 on Sat Jul 1 17:20:372006118 on Sat Jul 1 22:14:02 2006 119 119 120 120 </td></tr> trunk/infrastructure/pyd/doc/make_object.html
r24 r25 192 192 Page was generated with 193 193 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 194 on Sat Jul 1 17:20:372006194 on Sat Jul 1 22:14:02 2006 195 195 196 196 </td></tr> trunk/infrastructure/pyd/doc/object.html
r24 r25 1512 1512 Page was generated with 1513 1513 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 1514 on Sat Jul 1 17:20:3720061514 on Sat Jul 1 22:14:02 2006 1515 1515 1516 1516 </td></tr> trunk/infrastructure/pyd/doc/pyd.html
r24 r25 29 29 Page was generated with 30 30 <img src="candydoc/img/candydoc.gif" style="vertical-align:middle; position:relative; top:-1px"> 31 on Sat Jul 1 17:20:37200631 on Sat Jul 1 22:14:02 2006 32 32 33 33 </td></tr> trunk/infrastructure/pyd/wiki_doc/class_wrap.html
r24 r25 2 2 <!-- Generated by Ddoc from pyd\class_wrap.d --> 3 3 <br><br> 4 <dl><dt><big>struct <u><u>wrapped_class_object</u></u>; 5 </big></dt> 6 <dd>The class object, a subtype of PyObject 7 <br><br> 8 4 9 <dl></dl> 10 </dd> 11 <dt><big>template <u>wrapped_class_type</u>(T)</big></dt> 12 <dd><br><br> 13 <dl><dt><big>PyTypeObject <u>wrapped_class_type</u>; 14 </big></dt> 15 <dd>The type object, an instance of PyType_Type 16 <br><br> 5 17 18 </dd> 19 </dl> 20 </dd> 21 <dt><big>template <u>wrapped_methods</u>(T)</big></dt> 22 <dd>Various wrapped methods 23 <br><br> 24 25 <dl><dt><big>PyObject* <u>wrapped_new</u>(PyTypeObject* <i>type</i>, PyObject* <i>args</i>, PyObject* <i>kwds</i>); 26 </big></dt> 27 <dd>The generic "_new__" method 28 <br><br> 29 30 </dd> 31 <dt><big>void <u>wrapped_dealloc</u>(PyObject* <i>_self</i>); 32 </big></dt> 33 <dd>The generic dealloc method. 34 <br><br> 35 36 </dd> 37 <dt><big>PyObject* <u>wrapped_repr</u>(PyObject* <i>_self</i>); 38 </big></dt> 39 <dd>The default repr method calls the class's toString. 40 <br><br> 41 42 </dd> 43 </dl> 44 </dd> 45 <dt><big>template <u>wrapped_init</u>(T)</big></dt> 46 <dd><br><br> 47 <dl><dt><big>int <u>init</u>(PyObject* <i>self</i>, PyObject* <i>args</i>, PyObject* <i>kwds</i>); 48 </big></dt> 49 <dd>The default init method calls the class's zero-argument constructor. 50 <br><br> 51 52 </dd> 53 </dl> 54 </dd> 55 <dt><big>template <u>wrapped_get</u>(T,alias Fn)</big></dt> 56 <dd><br><br> 57 <dl><dt><big>PyObject* <u>func</u>(PyObject* <i>self</i>, void* <i>closure</i>); 58 </big></dt> 59 <dd>A generic wrapper around a "getter" property. 60 <br><br> 61 62 </dd> 63 </dl> 64 </dd> 65 <dt><big>template <u>wrapped_set</u>(T,alias Fn)</big></dt> 66 <dd><br><br> 67 <dl><dt><big>int <u>func</u>(PyObject* <i>self</i>, PyObject* <i>value</i>, void* <i>closure</i>); 68 </big></dt> 69 <dd>A generic wrapper around a "setter" property. 70 <br><br> 71 72 </dd> 73 </dl> 74 </dd> 75 <dt><big>template <u>is_wrapped</u>(T)</big></dt> 76 <dd>A useful check for whether a given class has been wrapped. Mainly used by 77 the conversion functions (see make_object.d), but possibly useful elsewhere. 78 79 <br><br> 80 81 <dl></dl> 82 </dd> 83 <dt><big>struct <u><u>wrapped_class</u></u>; 84 </big></dt> 85 <dd>This struct wraps a D class. Its member functions are the primary way of 86 wrapping the specific parts of the class. 87 88 <br><br> 89 90 <dl><dt><big>template <u>def</u>(char[] name,alias fn,uint MIN_ARGS = NumberOfArgs!(typeof(&fn)),fn_t = typeof(&fn))</big></dt> 91 <dd>Wraps a member function of the class. 92 <br><br> 93 <b>Params:</b><br> 94 <table><tr><td>name</td> 95 <td>The name of the function as it will appear in Python.</td></tr> 96 <tr><td>fn</td> 97 <td>The member function to wrap.</td></tr> 98 <tr><td>MIN_ARGS</td> 99 <td>The minimum number of arguments this function can accept.</td></tr> 100 <tr><td>fn_t</td> 101 <td>The type of the function. It is only useful to specify this 102 if more than one function has the same name as this one.</td></tr> 103 </table><br> 104 105 <dl></dl> 106 </dd> 107 <dt><big>template <u>prop</u>(char[] name,alias fn,bool RO = false)</big></dt> 108 <dd>Wraps a property of the class. 109 <br><br> 110 <b>Params:</b><br> 111 <table><tr><td>name</td> 112 <td>The name of the property as it will appear in Python.</td></tr> 113 <tr><td>fn</td> 114 <td>The property to wrap.</td></tr> 115 <tr><td>RO</td> 116 <td>Whether this is a read-only property.</td></tr> 117 </table><br> 118 119 <dl></dl> 120 </dd> 121 <dt><big>template <u>init</u>(alias C1 = undefined,alias C2 = undefined,alias C3 = undefined,alias C4 = undefined,alias C5 = undefined,alias C6 = undefined,alias C7 = undefined,alias C8 = undefined,alias C9 = undefined,alias C10 = undefined)</big></dt> 122 <dd>Wraps the constructors of the class. 123 <br><br> 124 This template takes a series of specializations of the ctor template 125 (see ctor_wrap.d), each of which describes a different constructor 126 that the class supports. The default constructor need not be 127 specified, and will always be available if the class supports it. 128 129 <br><br> 130 <font color=red>BUGS:</font><br> 131 This currently does not support having multiple constructors with 132 the same number of arguments. 133 134 <br><br> 135 136 <dl></dl> 137 </dd> 138 </dl> 139 </dd> 140 </dl> 141 trunk/infrastructure/pyd/wiki_doc/ctor_wrap.html
r24 r25 2 2 <!-- Generated by Ddoc from pyd\ctor_wrap.d --> 3 3 <br><br> 4 <dl><dt><big>template <u>ctor</u>(T1 = void,T2 = void,T3 = void,T4 = void,T5 = void,T6 = void,T7 = void,T8 = void,T9 = void,T10 = void)</big></dt> 5 <dd>This template defines the footprint of an individual constructor. 6 7 <br><br> 8 4 9 <dl></dl> 10 </dd> 11 </dl> 5 12 trunk/infrastructure/pyd/wiki_doc/def.html
r24 r25 14 14 For use with functions with default arguments. Defaults to 15 15 the maximum number of arguments this function supports.</td></tr> 16 <tr><td>fn_t</td> 17 <td>The function type of the function to wrap. This must be 18 specified if more than one function shares the same name, 19 otherwise the first one defined lexically will be used.</td></tr> 16 20 </table><br> 17 21 <b>Examples:</b><br> trunk/infrastructure/pyd/wiki_doc/dg_convert.html
r24 r25 1 1 <h1>pyd.dg_convert</h1> 2 2 <!-- Generated by Ddoc from pyd\dg_convert.d --> 3 This module contains some more or less dirty hacks for converting between 4 function and delegate types. Its contents are strictly for internal use 5 within Pyd. 6 3 7 <br><br> 8 4 9 <dl><dt><big>template <u>fn_to_dg</u>(Fn)</big></dt> 5 10 <dd>This template converts a function type into an equivalent delegate type. trunk/infrastructure/pyd/wiki_doc/ftype.html
r24 r25 11 11 <br><br> 12 12 <b>Date:</b><br> 13 Sat Jul 1 17:18:42200613 Sat Jul 1 22:15:08 2006 14 14 15 15
