-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
html_doc: Documented class wrapping, DPyObject
git-svn-id: http://svn.dsource.org/projects/pyd/trunk@34 1df65b71-e716-0410-9316-ac55df2b1602
- Loading branch information
KirkMcDonald
authored and
KirkMcDonald
committed
Aug 10, 2006
1 parent
f916116
commit 415cf00
Showing
9 changed files
with
154 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
<html><head> | ||
<META http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>pyd.dpyobject</title> | ||
</head><body> | ||
<h1>pyd.dpyobject</h1> | ||
<!-- Generated by Ddoc from pyd\dpyobject.d --> | ||
<br><br> | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
<link href="pyd.css" rel="stylesheet" type="text/css"> | ||
<title>pyd.dpyobject</title> | ||
</head> | ||
|
||
<body> | ||
<div class="nav"><a class="nav" href="index.html">Main</a> | <a class="nav" href="celerid.html">CeleriD</a> | <a class="nav" href="conversion.html">Type conversion</a> | <a class="nav" href="func_wrapping.html">Function wrapping</a> | <a class="nav" href="class_wrapping.html">Class wrapping</a> | <a class="nav" href="except_wrapping.html">Exception wrapping</a> | <a class="navcur" href="dpyobject.html">DPyObject</a></div> | ||
|
||
<h1>pyd.dpyobject</h1> | ||
<!-- Generated by Ddoc from pyd\dpyobject.d --> | ||
<p>The DPyObject class wraps a PyObject*, using the D garbage collector to handle the reference count so that you don't have to. It also overloads quite a lot of operators, and tries to make using Python objects in D code as much like using them in Python as possible. However, it is incomplete (the function and method call methods in particular need work, and there are a number of helper functions that need to be written), and remains a work in progress.</p> | ||
|
||
<dl><dt><big>class <u>DPyObject</u>; | ||
</big></dt> | ||
<dd>Wrapper class for a Python/C API PyObject. | ||
|
@@ -14,10 +22,7 @@ <h1>pyd.dpyobject</h1> | |
|
||
<br><br> | ||
<b>Authors:</b><br> | ||
<a href="mailto:[email protected]">Kirk McDonald</a> | ||
<br><br> | ||
<b>Date:</b><br> | ||
June 18, 2006 | ||
Kirk McDonald | ||
<br><br> | ||
<b>See Also:</b><br> | ||
<a href="http://docs.python.org/api/api.html">The Python/C API</a> | ||
|
@@ -29,35 +34,23 @@ <h1>pyd.dpyobject</h1> | |
<dd>Wrap around a passed PyObject*. | ||
<br><br> | ||
<b>Params:</b><br> | ||
<table><tr><td>PyObject * <i>o</i></td> | ||
<td>The PyObject to wrap.</td></tr> | ||
<tr><td>bool <i>borrowed</i></td> | ||
<td>Whether <i>o</i> is a borrowed reference. Instances | ||
<table> | ||
<tr><td>PyObject * <i>o</i></td> <td>The PyObject to wrap.</td></tr> | ||
<tr><td>bool <i>borrowed</i></td> <td>Whether <i>o</i> is a borrowed reference. Instances | ||
of DPyObject always own their references. | ||
Therefore, Py_INCREF will be called if <i>borrowed</i> is | ||
<font color=blue><b>true</b></font>.</td></tr> | ||
</table><br> | ||
true.</td></tr> | ||
</table><br /></dd> | ||
|
||
</dd> | ||
<dt><big>this(); | ||
</big></dt> | ||
<dd>The default constructor constructs an instance of the Py_None DPyObject. | ||
<br><br> | ||
<dt><big>this();</big></dt> | ||
<dd>The default constructor constructs an instance of the Py_None DPyObject.<br /><br /></dd> | ||
|
||
</dd> | ||
<dt><big>PyObject * <u>ptr</u>(); | ||
</big></dt> | ||
<dd>Returns a borrowed reference to the PyObject. | ||
|
||
<br><br> | ||
<dt><big>PyObject * <u>ptr</u>();</big></dt> | ||
<dd>Returns a borrowed reference to the PyObject.<br><br></dd> | ||
|
||
</dd> | ||
<dt><big>bool <u>hasattr</u>(char[] <i>attr_name</i>); | ||
</big></dt> | ||
<dd>Same as hasattr(this, <i>attr_name</i>) in Python. | ||
<br><br> | ||
<dt><big>bool <u>hasattr</u>(char[] <i>attr_name</i>);</big></dt> | ||
<dd>Same as hasattr(this, <i>attr_name</i>) in Python.<br><br></dd> | ||
|
||
</dd> | ||
<dt><big>bool <u>hasattr</u>(DPyObject <i>attr_name</i>); | ||
</big></dt> | ||
<dd>Same as hasattr(this, <i>attr_name</i>) in Python. | ||
|
@@ -160,9 +153,9 @@ <h1>pyd.dpyobject</h1> | |
<br><br> | ||
|
||
</dd> | ||
<dt><big>DPyObject <u>opCall</u>(DPyObject <i>args</i> = cast(DPyObject)null); | ||
<dt><big>DPyObject <u>opCall</u>(DPyObject <i>args</i> = null); | ||
</big></dt> | ||
<dd>Calls the DPyObject. | ||
<dd>Calls the DPyObject. <strong>(Note: The opCall functions will be changing in the future to something more useful.)</strong> | ||
<br><br> | ||
<b>Params:</b><br> | ||
<table><tr><td>DPyObject <i>args</i></td> | ||
|
@@ -192,7 +185,7 @@ <h1>pyd.dpyobject</h1> | |
<br><br> | ||
|
||
</dd> | ||
<dt><big>DPyObject <u>method</u>(char[] <i>name</i>, DPyObject <i>args</i> = cast(DPyObject)null); | ||
<dt><big>DPyObject <u>method</u>(char[] <i>name</i>, DPyObject <i>args</i> = null); | ||
</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
|
@@ -397,7 +390,7 @@ <h1>pyd.dpyobject</h1> | |
</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
<dt><big>DPyObject <u>pow</u>(DPyObject <i>o1</i>, DPyObject <i>o2</i> = cast(DPyObject)null); | ||
<dt><big>DPyObject <u>pow</u>(DPyObject <i>o1</i>, DPyObject <i>o2</i> = null); | ||
</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
|
@@ -467,7 +460,7 @@ <h1>pyd.dpyobject</h1> | |
</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
<dt><big>DPyObject <u>powAssign</u>(DPyObject <i>o1</i>, DPyObject <i>o2</i> = cast(DPyObject)null); | ||
<dt><big>DPyObject <u>powAssign</u>(DPyObject <i>o1</i>, DPyObject <i>o2</i> = null); | ||
</big></dt> | ||
<dd><br><br> | ||
</dd> | ||
|
@@ -591,5 +584,7 @@ <h1>pyd.dpyobject</h1> | |
</dd> | ||
</dl> | ||
|
||
<hr><small>Page generated by <a href="http://www.digitalmars.com/d/ddoc.html">Ddoc</a>. </small> | ||
</body></html> | ||
<hr /> | ||
<small>Page generated by <a href="http://www.digitalmars.com/d/ddoc.html">Ddoc</a>.</small> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
C:\dmd\dmd\bin\dmd.exe -o- -Ddpyd\wiki_doc pyd\class_wrap.d pyd\ctor_wrap.d pyd\def.d pyd\dg_convert.d pyd\exception.d pyd\ftype.d pyd\make_object.d pyd\dpyobject.d pyd\pyd.d -Ipython\headers | ||
C:\dmd\dmd\bin\dmd.exe -o- -Ddpyd\wiki_doc pyd\class_wrap.d pyd\ctor_wrap.d pyd\def.d pyd\dg_convert.d pyd\dpyobject.d pyd\exception.d pyd\ftype.d pyd\make_object.d pyd\op_wrap.d pyd\pyd.d pyd\tuples.d -Ipython\headers | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
DDOC = <h1>$(TITLE)</h1> | ||
DDOC = <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> | ||
<link href="pyd.css" rel="stylesheet" type="text/css"> | ||
<title>$(TITLE)</title> | ||
</head> | ||
|
||
<body> | ||
<div class="nav"><a class="nav" href="index.html">Main</a> | <a class="nav" href="celerid.html">CeleriD</a> | <a class="nav" href="conversion.html">Type conversion</a> | <a class="nav" href="func_wrapping.html">Function wrapping</a> | <a class="nav" href="class_wrapping.html">Class wrapping</a> | <a class="nav" href="except_wrapping.html">Exception wrapping</a></div> | ||
|
||
<h1>$(TITLE)</h1> | ||
|
||
$(BODY) | ||
</body> | ||
</html> | ||
|
||
|