[C++-sig] Re: pure virtual methods with pyste
by David Abrahams other posts by this author
Aug 25 2003 6:42PM messages near this date
Re: [C++-sig] Re: pure virtual methods with pyste
|
Re: [C++-sig] Re: pure virtual methods with pyste
Nicodemus <nicodemus@[...].br> writes:
> David Abrahams wrote:
>
> >David Abrahams <dave@[...].com> writes:
> >
> >
> >> BOOST_PYTHON_MODULE(test)
> >> {
> >> class_<Abstract, AbstractWrap, boost::noncopyable>("Abstract")
> >> .def("a", &Abstract::a)
> >> .def("a", &AbstractWrap::default_a)
> >> ;
> >>
> >> def("call", call);
> >> }
> >>
> >>I just wish I knew a way to detect that a function was pure-virtual so
> >>we could have Boost.Python generate that default_a automatically.
> >>
> >
> >Perhaps this interface would be nice:
> >
> > BOOST_PYTHON_MODULE(test)
> > {
> > class_<Abstract, AbstractWrap, boost::noncopyable>("Abstract")
> > .def("a", pure_virtual(&Abstract::a))
> > ;
> >
> > def("call", call);
> > }
> >
> >??
> >
>
> Seems nice enough for me. 8)
OK, done; see <boost/python/pure_virtual.hpp> . Perhaps you should
change Pyste to use this facility.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
David Abrahams
David Abrahams
David Abrahams
Nicodemus
David Abrahams
Nicodemus
Nicodemus
David Abrahams
Nicodemus
David Abrahams
Nicodemus
Nicodemus
David Abrahams
David Abrahams
Nicodemus
David Abrahams
Nicodemus
David Abrahams
Nicodemus
David Abrahams
Nicodemus
Daniel Wallin
David Abrahams
Daniel Wallin
Nicodemus
David Abrahams
David Abrahams
David Abrahams
|