Package pyplusplus :: Package function_transformers :: Module templates :: Class virtual_mem_fun |

# ClassType virtual_mem_fun

source code

Class Variables
| override = `Template(os.linesep.join(['virtual $return_type $fu`...``
| default = `Template(os.linesep.join(['static $return_type $uniq`...``

Class Variable Details

  ### override Value:
      Template(os.linesep.join(['virtual $return_type $function_name( $arg_d
      eclarations )$constness $throw{', '    namespace bpl = boost::python;'
      , '    if( bpl::override $py_function_var = this->get_override( "$func
      tion_alias" ) ){', '        $declare_py_variables', '        $py_pre_c
      all', '        ${save_py_result}bpl::call<bpl::object>( $py_function_v
      ar.ptr()$py_arg_expressions );', '        $py_post_call', '        $py
      _return', '    }', '    else{', '        $cpp_return$wrapped_class::$f
      unction_name( $cpp_arg_expressions );', '    }', '}']))

  ### default Value:
      Template(os.linesep.join(['static $return_type $unique_function_name(
      $arg_declarations ){', '    $declare_variables', '    $pre_call', '
       if( dynamic_cast< $wrapper_class $wrapped_inst_constness* >( boost::a
      ddressof( $wrapped_inst ) ) ){', '        $save_result$wrapped_inst.$w
      rapped_class::$function_name($arg_expressions);', '    }', '    else{'
      , '        $save_result$wrapped_inst.$function_name($arg_expressions);
      ', '    }', '    $post_call', '    $return', '}']))