mirror of
https://github.com/boostorg/python.git
synced 2026-01-22 05:22:45 +00:00
doc update
[SVN r15639]
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
"ObjectWrapper.html#TypeWrapper-concept">TypeWrapper</a> concept
|
||||
definition. Since <code>dict</code> is publicly derived from <code><a
|
||||
href="object.html#object-spec">object</a></code>, the public object
|
||||
interfaceapplies to <code>dict</code> instances as well.</p>
|
||||
interface applies to <code>dict</code> instances as well.</p>
|
||||
|
||||
<h4><a name="dict-spec-synopsis"></a>Class <code>dict</code>
|
||||
synopsis</h4>
|
||||
@@ -126,7 +126,7 @@ namespace boost
|
||||
object itervalues() const;
|
||||
list keys() const;
|
||||
};
|
||||
};
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2><a name="examples"></a>Example</h2>
|
||||
|
||||
140
doc/v2/list.html
Normal file
140
doc/v2/list.html
Normal file
@@ -0,0 +1,140 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content=
|
||||
"HTML Tidy for Windows (vers 1st August 2002), see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../boost.css">
|
||||
|
||||
<title>Boost.Python - <boost/python/list.hpp></title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table border="0" cellpadding="7" cellspacing="0" width="100%" summary=
|
||||
"header">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../../index.htm"><img height="86" width="277"
|
||||
alt="C++ Boost" src="../../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
<h1 align="center">Boost.Python</h1>
|
||||
|
||||
<h2 align="center">Header <boost/python/list.hpp></h2>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
|
||||
<h2>Contents</h2>
|
||||
|
||||
<dl class="page-index">
|
||||
<dt><a href="#introduction">Introduction</a></dt>
|
||||
|
||||
<dt><a href="#classes">Classes</a></dt>
|
||||
|
||||
<dd>
|
||||
<dl class="page-index">
|
||||
<dt><a href="#list-spec">Class <code>list</code></a></dt>
|
||||
|
||||
<dd>
|
||||
<dl class="page-index">
|
||||
<dt><a href="#list-spec-synopsis">Class <code>list</code>
|
||||
synopsis</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
|
||||
<dt><a href="#examples">Example(s)</a></dt>
|
||||
</dl>
|
||||
<hr>
|
||||
|
||||
<h2><a name="introduction"></a>Introduction</h2>
|
||||
|
||||
<p>Exposes a <a href=
|
||||
"ObjectWrapper.html#TypeWrapper-concept">TypeWrapper</a> for the Python
|
||||
<a href=
|
||||
"http://www.python.org/doc/current/lib/typesseq-mutable.html">list</a>
|
||||
type.</p>
|
||||
|
||||
<h2><a name="classes"></a>Classes</h2>
|
||||
|
||||
<h3><a name="list-spec"></a>Class <code>list</code></h3>
|
||||
|
||||
<p>Exposes the <a href=
|
||||
"http://www.python.org/doc/current/lib/typesseq-mutable.html">mapping
|
||||
protocol</a> of Python's built-in <code>list</code> type. The semantics
|
||||
of the constructors and member functions defined below can be fully
|
||||
understood by reading the <a href=
|
||||
"ObjectWrapper.html#TypeWrapper-concept">TypeWrapper</a> concept
|
||||
definition. Since <code>list</code> is publicly derived from <code><a
|
||||
href="object.html#object-spec">object</a></code>, the public object
|
||||
interface applies to <code>list</code> instances as well.</p>
|
||||
|
||||
<h4><a name="list-spec-synopsis"></a>Class <code>list</code>
|
||||
synopsis</h4>
|
||||
<pre>
|
||||
namespace boost
|
||||
{
|
||||
class list : public object
|
||||
{
|
||||
public:
|
||||
list(); // new list
|
||||
|
||||
template <class T>
|
||||
explicit list(T const& sequence);
|
||||
|
||||
template <class T>
|
||||
void append(T const& x);
|
||||
|
||||
template <class T>
|
||||
long count(T const& value) const;
|
||||
|
||||
template <class T>
|
||||
void extend(T const& x);
|
||||
|
||||
template <class T>
|
||||
long index(T const& x) const;
|
||||
|
||||
template <class T>
|
||||
void insert(object const& index, T const& x); // insert object before index
|
||||
|
||||
object pop(); // remove and return item at index (default last)
|
||||
object pop(long index);
|
||||
object pop(object const& index);
|
||||
|
||||
template <class T>
|
||||
void remove(T const& value);
|
||||
|
||||
void reverse(); // reverse *IN PLACE*
|
||||
|
||||
void sort(); // sort *IN PLACE*; if given, cmpfunc(x, y) -> -1, 0, 1
|
||||
|
||||
template <class T>
|
||||
void sort(T const& value);
|
||||
};
|
||||
}
|
||||
</pre>
|
||||
|
||||
<h2><a name="examples"></a>Example</h2>
|
||||
<pre>
|
||||
using namespace boost::python;
|
||||
|
||||
// Return the number of zeroes in the list
|
||||
long zeroes(list l)
|
||||
{
|
||||
return l.count(0);
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>Revised 1 October, 2002</p>
|
||||
|
||||
<p><i>© Copyright <a href=
|
||||
"../../../../people/dave_abrahams.htm">Dave Abrahams</a> 2002. All Rights
|
||||
Reserved.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user