Please help. I am just a beginner with pyplusplus and am not smart enough to see how to create certain complex rules.
How would I create a pyplusplus rule for setting the return policy to "return internal reference" for all member functions that meet the following criteria: * method name begins with "set" * return type is a reference to the parent class or to one of its base classes I would sincerely appreciate an example that could do this. Then perhaps I might be able to figure out how to perform other clever manipulations. Thanks in advance for your help. ################################# struct Foo { // example of the sort of method I mean Foo& setBaz(int baz); // returns reference to self }; ################################# from pyplusplus import module_builder from pyplusplus.module_builder.call_policies import * mb = module_builder(...) # want "something" below... mb.decls(<something?>).call_policies = return_internal_reference() ################################# --Chris Bruns _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig