ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> cpp-sig
cpp-sig
Re: [C++-sig] How do I wrap a static member function?
by Ravi other posts by this author
Oct 30 2009 8:39PM messages near this date
[C++-sig] How do I wrap a static member function? | Re: [C++-sig] How do I wrap a static member function?
Use class_.staticmethod(...) as shown below:

On Friday 30 October 2009 17:47:45 James Amundson wrote:
>  BOOST_PYTHON_MODULE(foo)
>  {
>       class_<Foo>("Foo",init<>())
>       .def("doit", &Foo::doit)

       .staticmethod( "doit" )

>       .def("nonstatic_doit", &Foo::nonstatic_doit)
>       ;
>  }
 
Regards,
Ravi

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@[...].org
http://mail.python.org/mailman/listinfo/cplusplus-sig
Thread:
James Amundson
Ravi
James Amundson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved