[C++-sig] Re: Iterators + shared_ptr + Abstract base classes + Pass by reference = help :)

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu Jan 9 19:44:51 CET 2003


--- David Abrahams <dave at boost-consulting.com> wrote:
> Are you sure it wouldn't work to just expose
> std::vector<shared_ptr<Abstract> > using class_ and
> write all the neccessary methods so that it looks like
> a Python List?

If you decide to go down that road have a look at the file

scitbx/include/scitbx/array_family/boost_python/flex_wrapper.h

which could be useful as a template for a std::vector<> wrapper.

(flex_wrapper.h is for reference-counted C++ container types.)

Ralf


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com




More information about the Cplusplus-sig mailing list