#include <functionRemap.h>
Public Types | |
typedef vector< Parameter > | Parameters |
enum | Type { T_normal, T_constructor, T_destructor, T_typecast_method, T_assignment_method, T_typecast, T_getter, T_setter } |
Public Member Functions | |
FunctionRemap (const InterrogateType &itype, const InterrogateFunction &ifunc, CPPInstance *cppfunc, int num_default_parameters, InterfaceMaker *interface) | |
~FunctionRemap () | |
string | get_parameter_name (int n) const |
Returns a string that will be a suitable name for the nth parameter in the generated code. | |
string | call_function (ostream &out, int indent_level, bool convert_result, const string &container, const vector_string &pexprs=vector_string()) const |
Writes a sequence of commands to the given output stream to call the wrapped function. | |
void | write_orig_prototype (ostream &out, int indent_level) const |
Writes a line describing the original C++ method or function. | |
FunctionWrapperIndex | make_wrapper_entry (FunctionIndex function_index) |
Creates an InterrogateFunctionWrapper object corresponding to this callable instance and stores it in the database. | |
Public Attributes | |
Parameters | _parameters |
ParameterRemap * | _return_type |
bool | _void_return |
bool | _has_this |
int | _first_true_parameter |
int | _num_default_parameters |
Type | _type |
string | _expression |
string | _function_signature |
string | _hash |
string | _unique_name |
string | _wrapper_name |
FunctionWrapperIndex | _wrapper_index |
bool | _return_value_needs_management |
FunctionIndex | _return_value_destructor |
bool | _manage_reference_count |
CPPType * | _cpptype |
CPPScope * | _cppscope |
CPPInstance * | _cppfunc |
CPPFunctionType * | _ftype |
bool | _is_valid |
Private Member Functions | |
string | get_call_str (const string &container, const vector_string &pexprs) const |
Returns a string suitable for calling the wrapped function. | |
string | get_parameter_expr (int n, const vector_string &pexprs) const |
Returns a string that represents the expression associated with the nth parameter. | |
bool | setup_properties (const InterrogateFunction &ifunc, InterfaceMaker *interface) |
Sets up the properties of the function appropriately. |
The InterfaceMaker class will create one of these for each function, including one for each instance of an overloaded function.
Definition at line 62 of file functionRemap.h.
|
Definition at line 97 of file functionRemap.h. |
|
Definition at line 86 of file functionRemap.h. |
|
Definition at line 46 of file functionRemap.cxx. |
|
Definition at line 77 of file functionRemap.cxx. References ostringstream::str(). |
|
Writes a sequence of commands to the given output stream to call the wrapped function. The parameter values are taken from pexprs, if it is nonempty, or are assumed to be simply the names of the parameters, if it is empty. The return value is the expression to return, if we are returning a value, or the empty string if we return nothing. Definition at line 126 of file functionRemap.cxx. |
|
Returns a string suitable for calling the wrapped function. If pexprs is nonempty, it represents the list of expressions that will evaluate to each parameter value. Definition at line 379 of file functionRemap.cxx. References _parameters, and get_parameter_expr(). |
|
Returns a string that represents the expression associated with the nth parameter. This is just the nth element of pexprs if it is nonempty, or the name of the nth parameter is it is empty. Definition at line 447 of file functionRemap.cxx. References _cpptype, _first_true_parameter, CPPFunctionType::_flags, _ftype, FunctionRemap::Parameter::_has_name, FunctionRemap::Parameter::_name, _parameters, FunctionRemap::Parameter::_remap, and CPPFunctionType::F_const_method. Referenced by get_call_str(). |
|
Returns a string that will be a suitable name for the nth parameter in the generated code. This may not correspond to the name of the parameter in the original code. Definition at line 95 of file functionRemap.cxx. References _cpptype, _return_type, _type, CPPType::get_local_name(), ParameterRemap::get_orig_type(), InterfaceMaker::indent(), TypeManager::is_reference_count(), NULL, parser, T_destructor, and T_typecast_method. Referenced by InterfaceMakerPythonObj::write_function_for(). |
|
Creates an InterrogateFunctionWrapper object corresponding to this callable instance and stores it in the database.
Definition at line 283 of file functionRemap.cxx. References InterrogateFunctionWrapper::PF_has_name. Referenced by InterfaceMaker::get_wrapper_name(). |
|
Sets up the properties of the function appropriately. Returns true if successful, or false if there is something unacceptable about the function. Definition at line 467 of file functionRemap.cxx. References _type, and T_assignment_method. |
|
Writes a line describing the original C++ method or function. This is generally useful only within a comment. Definition at line 266 of file functionRemap.cxx. References InterrogateFunctionWrapper::F_callable_by_name. Referenced by InterfaceMakerPythonObj::write_function_for(). |
|
Definition at line 119 of file functionRemap.h. Referenced by InterfaceMakerPythonObj::write_function_for(). |
|
Definition at line 118 of file functionRemap.h. |
|
Definition at line 117 of file functionRemap.h. Referenced by get_parameter_expr(), and get_parameter_name(). |
|
Definition at line 106 of file functionRemap.h. |
|
Definition at line 103 of file functionRemap.h. Referenced by get_parameter_expr(). |
|
Definition at line 120 of file functionRemap.h. Referenced by get_parameter_expr(). |
|
Definition at line 107 of file functionRemap.h. |
|
Definition at line 102 of file functionRemap.h. Referenced by InterfaceMaker::get_wrapper_name(). |
|
Definition at line 108 of file functionRemap.h. Referenced by InterfaceMaker::synthesize_this_parameter(). |
|
Definition at line 122 of file functionRemap.h. Referenced by InterfaceMaker::synthesize_this_parameter(). |
|
Definition at line 115 of file functionRemap.h. |
|
Definition at line 104 of file functionRemap.h. |
|
Definition at line 99 of file functionRemap.h. Referenced by get_call_str(), get_parameter_expr(), and InterfaceMakerPythonObj::write_function_for(). |
|
Definition at line 100 of file functionRemap.h. Referenced by get_parameter_name(). |
|
Definition at line 114 of file functionRemap.h. |
|
Definition at line 113 of file functionRemap.h. |
|
Definition at line 105 of file functionRemap.h. Referenced by get_parameter_name(), and setup_properties(). |
|
Definition at line 109 of file functionRemap.h. Referenced by InterfaceMaker::synthesize_this_parameter(), and InterfaceMakerPythonSimple::write_functions(). |
|
Definition at line 101 of file functionRemap.h. |
|
Definition at line 111 of file functionRemap.h. |
|
Definition at line 110 of file functionRemap.h. Referenced by InterfaceMakerPythonSimple::get_wrapper_prefix(), InterfaceMaker::synthesize_this_parameter(), and InterfaceMakerPythonSimple::write_functions(). |