mirror of
https://github.com/boostorg/python.git
synced 2026-01-19 16:32:16 +00:00
104 lines
2.8 KiB
HTML
104 lines
2.8 KiB
HTML
<!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/args.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"><a href="../index.html">Boost.Python</a></h1>
|
|
|
|
<h2 align="center">Header <boost/python/args.hpp></h2>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<hr>
|
|
|
|
<h2>Contents</h2>
|
|
|
|
<dl class="page-index">
|
|
<dt><a href="#introduction">Introduction</a></dt>
|
|
|
|
<dt><a href="#keyword-expression"><i>keyword-expressions</i></a></dt>
|
|
|
|
<dt><a href="#functions">Functions</a></dt>
|
|
|
|
<dd>
|
|
<dl class="page-index">
|
|
<dt><code><a href=
|
|
"#args-spec">args</a>(</code>...<code>)</code></dt>
|
|
</dl>
|
|
</dd>
|
|
|
|
<dt><a href="#examples">Example(s)</a></dt>
|
|
</dl>
|
|
<hr>
|
|
|
|
<h2><a name="introduction"></a>Introduction</h2>
|
|
|
|
<p>Supplies a family of overloaded functions for specifying argument
|
|
keywords for wrapped C++ functions.</p>
|
|
|
|
<h2><a name="keyword-expression"></a><i>keyword-expressions</i></h2>
|
|
|
|
<p>A <b>keyword-expression</b> results in an object which holds a
|
|
sequence of <a href="definitions.html#ntbs">ntbs</a>es, and whose type
|
|
encodes the number of keywords specified.</p>
|
|
|
|
<h2><a name="functions"></a>Functions</h2>
|
|
|
|
<h3><a name="args-spec"></a><code>args(</code>...<code>)</code></h3>
|
|
<pre>
|
|
<i>unspecified1</i> args(char const*);
|
|
<i>unspecified2</i> args(char const*, char const*);
|
|
.
|
|
.
|
|
.
|
|
<i>unspecifiedN</i> args(char const*, char const*, ... char const*);
|
|
</pre>
|
|
|
|
<dl class="function-semantics">
|
|
<dt><b>Requires:</b> Every argument must be a <a href=
|
|
"definitions.html#ntbs">ntbs</a>.</dt>
|
|
|
|
<dt><b>Returns:</b> an object representing a <a href=
|
|
"#keyword-expression"><i>keyword-expression</i></a> encapsulating the
|
|
arguments passed.</dt>
|
|
</dl>
|
|
|
|
<h2><a name="examples"></a>Example</h2>
|
|
<pre>
|
|
#include <boost/python/def.hpp>
|
|
using namespace boost::python;
|
|
|
|
int f(int x, int y, int z);
|
|
|
|
BOOST_PYTHON_MODULE(xxx)
|
|
{
|
|
def("f", f, args("x", "y", "z"));
|
|
}
|
|
</pre>
|
|
|
|
<p>Revised 05 November, 2001</p>
|
|
|
|
<p><i>© Copyright <a href=
|
|
"../../../../people/dave_abrahams.htm">Dave Abrahams</a> 2002. All Rights
|
|
Reserved.</i></p>
|
|
</body>
|
|
</html>
|
|
|