I have pyplusplus churning out code, now I'm trying to get it to resemble what I need. I need to use <tt class="descname">add_override_precall_code</tt>, to add some thread locking to my overrides, but I can't seem to figure out how to use it from the docs. Also, I have a set of overloaded virtual functions, and previously I've had a wrapper class where the python exports rename the overloads, like so:<br>
<br>class Connection<br>{<br> virtual void Callback(const Type_A&);<br> virtual void Callback(const Type_B&);<br>}<br><br>the wrapper looked like:<br><br>ConnectionWrap : Connection, wrapper<Connection><br>
{<br> void Callback(const Type_A& arg) <br> {<br> ScopedGILLock lock(m_state); // the reason I'm trying to figure out add_override_porecall_code<br> if (override o = this->get_override("Callback_Type_A")) <br>
{ o(arg); } <br> }<br>};<br><br><br>I'm getting the rest of the override as above, but setting use_overload_macro doesn't rename the overloads as I need. Any clues (since pointers are references are both 'overloaded' in this context')<br>
<br>