C++ Boost

Boost.Python

Header <boost/python/args.hpp>


Contents

Introduction
keyword-expressions
Functions
args(...)
Example(s)

Introduction

Supplies a family of overloaded functions for specifying argument keywords for wrapped C++ functions.

keyword-expressions

A keyword-expression results in an object which holds a sequence of ntbses, and whose type encodes the number of keywords specified.

Functions

args(...)

unspecified1 args(char const*);
unspecified2 args(char const*, char const*);
   .
   .
   .
unspecifiedN args(char const*, char const*, ... char const*);
Requires: Every argument must be a ntbs.
Returns: an object representing a keyword-expression encapsulating the arguments passed.

Example

#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"));
}

Revised 05 November, 2001

© Copyright Dave Abrahams 2002. All Rights Reserved.