[C++-sig] Wrap class without a default constructor
David Abrahams
dave at boost-consulting.com
Fri Sep 6 05:28:39 CEST 2002
See http://mail.python.org/pipermail/c++-sig/2002-August/001928.html
HTH,
Dave
-----------------------------------------------------------
David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com
----- Original Message -----
From: "Min Xu" <minxu at sci.ccny.cuny.edu>
To: <c++-sig at python.org>
Sent: Thursday, September 05, 2002 11:15 PM
Subject: [C++-sig] Wrap class without a default constructor
It used to work to wrap a class which does define a default constructor in
v2
and it does not work any more from the current CVS version. What's right
way
now? Thanks.
--- snip ---
python::class_<geometry >("geometry")
.def_init(args<const grid*>()
// Keep the grid alive as long as the geometry is.
, python::with_custodian_and_ward<1,2>())
.def_init(args<double, double, const grid*>())
.def_init(args<double, const grid*, geometryType>());
geometry does have a default constructor.
---snip ---
Min Xu
_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
More information about the Cplusplus-sig
mailing list