Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

FunctionRemap Class Reference

#include <functionRemap.h>

List of all members.

Public Types

typedef vector< ParameterParameters
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
string call_function (ostream &out, int indent_level, bool convert_result, const string &container, const vector_string &pexprs=vector_string()) const
void write_orig_prototype (ostream &out, int indent_level) const
FunctionWrapperIndex make_wrapper_entry (FunctionIndex function_index)

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
string get_parameter_expr (int n, const vector_string &pexprs) const
bool setup_properties (const InterrogateFunction &ifunc, InterfaceMaker *interface)


Member Typedef Documentation

typedef vector<Parameter> FunctionRemap::Parameters
 

Definition at line 85 of file functionRemap.h.


Member Enumeration Documentation

enum FunctionRemap::Type
 

Enumeration values:
T_normal 
T_constructor 
T_destructor 
T_typecast_method 
T_assignment_method 
T_typecast 
T_getter 
T_setter 

Definition at line 74 of file functionRemap.h.


Constructor & Destructor Documentation

FunctionRemap::FunctionRemap const InterrogateType itype,
const InterrogateFunction ifunc,
CPPInstance cppfunc,
int  num_default_parameters,
InterfaceMaker interface
 

Definition at line 41 of file functionRemap.cxx.

References _cppfunc, InterrogateType::_cppscope, _cppscope, InterrogateType::_cpptype, _cpptype, _first_true_parameter, _ftype, _has_this, _is_valid, _manage_reference_count, _num_default_parameters, _return_type, _return_value_destructor, _return_value_needs_management, CPPInstance::_type, _type, _void_return, _wrapper_index, CPPDeclaration::as_function_type(), NULL, setup_properties(), and T_normal.

FunctionRemap::~FunctionRemap  ) 
 

Definition at line 70 of file functionRemap.cxx.


Member Function Documentation

string FunctionRemap::call_function ostream out,
int  indent_level,
bool  convert_result,
const string &  container,
const vector_string pexprs = vector_string()
const
 

Definition at line 102 of file functionRemap.cxx.

References _cpptype, _return_type, _type, assert, get_call_str(), CPPType::get_local_name(), ParameterRemap::get_orig_type(), ParameterRemap::get_return_expr(), InterfaceMaker::indent(), TypeManager::is_reference_count(), nout, NULL, CPPType::output_instance(), parser, ParameterRemap::prepare_return_expr(), ParameterRemap::return_value_should_be_simple(), T_assignment_method, T_constructor, T_destructor, T_typecast, and T_typecast_method.

Referenced by InterfaceMakerPythonSimple::write_function_instance(), InterfaceMakerPythonObj::write_function_instance(), and InterfaceMakerC::write_function_instance().

string FunctionRemap::get_call_str const string &  container,
const vector_string pexprs
const [private]
 

Definition at line 339 of file functionRemap.cxx.

References _cppfunc, _cpptype, _expression, _first_true_parameter, _has_this, _parameters, _type, CPPInstance::get_local_name(), CPPType::get_local_name(), get_parameter_expr(), parser, ostringstream::str(), T_constructor, T_getter, and T_setter.

Referenced by call_function().

string FunctionRemap::get_parameter_expr int  n,
const vector_string pexprs
const [private]
 

Definition at line 401 of file functionRemap.cxx.

References get_parameter_name(), and n.

Referenced by get_call_str().

string FunctionRemap::get_parameter_name int  n  )  const
 

Definition at line 82 of file functionRemap.cxx.

References n, and ostringstream::str().

Referenced by get_parameter_expr(), InterfaceMakerC::write_function_header(), InterfaceMakerPythonSimple::write_function_instance(), and InterfaceMakerPythonObj::write_function_instance().

FunctionWrapperIndex FunctionRemap::make_wrapper_entry FunctionIndex  function_index  ) 
 

Definition at line 249 of file functionRemap.cxx.

References _cppfunc, InterrogateFunctionWrapper::_flags, InterrogateFunctionWrapper::_function, InterrogateFunctionWrapper::_parameters, _parameters, InterrogateFunctionWrapper::_return_type, _return_type, InterrogateFunctionWrapper::_return_value_destructor, _return_value_destructor, _unique_name, InterrogateFunctionWrapper::_unique_name, _void_return, _wrapper_index, _wrapper_name, InterrogateDatabase::add_wrapper(), assert, builder, InterrogateBuilder::clean_identifier(), InterrogateFunctionWrapper::F_callable_by_name, InterrogateFunctionWrapper::F_caller_manages, InterrogateFunctionWrapper::F_has_return, FunctionIndex, InterrogateBuilder::get_atomic_string_type(), CPPInstance::get_local_name(), ParameterRemap::get_new_type(), InterrogateDatabase::get_next_index(), InterrogateDatabase::get_ptr(), InterrogateBuilder::get_type(), ParameterRemap::new_type_is_atomic_string(), param, parser, InterrogateFunctionWrapper::PF_has_name, and InterrogateFunctionWrapper::PF_is_this.

Referenced by InterfaceMaker::record_function().

bool FunctionRemap::setup_properties const InterrogateFunction ifunc,
InterfaceMaker interface
[private]
 

Definition at line 416 of file functionRemap.cxx.

References _cppfunc, _cppscope, _cpptype, InterrogateFunction::_expression, _expression, _first_true_parameter, InterrogateFunction::_flags, CPPFunctionType::_flags, _ftype, _function_signature, _has_this, _manage_reference_count, _num_default_parameters, CPPParameterList::_parameters, CPPFunctionType::_parameters, _parameters, CPPFunctionType::_return_type, _return_type, _return_value_destructor, _return_value_needs_management, CPPInstance::_storage_class, _type, _void_return, assert, builder, CPPFunctionType::F_const_method, CPPFunctionType::F_constructor, CPPFunctionType::F_destructor, InterrogateFunction::F_getter, CPPFunctionType::F_operator_typecast, InterrogateFunction::F_setter, InterrogateFunction::F_typecast, InterrogateBuilder::get_destructor_for(), TypeManager::get_function_signature(), ParameterRemap::get_new_type(), ParameterRemap::get_return_value_destructor(), CPPInstance::get_simple_name(), TypeManager::get_void_type(), TypeManager::has_protected_destructor(), TypeManager::is_reference_count_pointer(), ParameterRemap::is_valid(), TypeManager::is_void(), manage_reference_counts, CPPType::new_type(), nout, NULL, param, params, parser, InterfaceMaker::remap_parameter(), CPPType::resolve_type(), ParameterRemap::return_value_needs_management(), CPPInstance::SC_static, ostringstream::str(), InterfaceMaker::synthesize_this_parameter(), T_assignment_method, T_constructor, T_destructor, T_getter, T_setter, T_typecast, T_typecast_method, type, and TypeManager::unwrap_pointer().

Referenced by FunctionRemap().

void FunctionRemap::write_orig_prototype ostream out,
int  indent_level
const
 

Definition at line 237 of file functionRemap.cxx.

References _cppfunc, _num_default_parameters, CPPInstance::output(), and parser.

Referenced by InterfaceMakerPythonObj::write_function_for(), InterfaceMakerPythonSimple::write_function_instance(), InterfaceMakerPythonObj::write_function_instance(), InterfaceMakerC::write_function_instance(), and InterfaceMaker::write_spam_message().


Member Data Documentation

CPPInstance* FunctionRemap::_cppfunc
 

Definition at line 107 of file functionRemap.h.

Referenced by FunctionRemap(), get_call_str(), make_wrapper_entry(), setup_properties(), InterfaceMakerPythonObj::write_function_instance(), and write_orig_prototype().

CPPScope* FunctionRemap::_cppscope
 

Definition at line 106 of file functionRemap.h.

Referenced by FunctionRemap(), and setup_properties().

CPPType* FunctionRemap::_cpptype
 

Definition at line 105 of file functionRemap.h.

Referenced by call_function(), FunctionRemap(), get_call_str(), and setup_properties().

string FunctionRemap::_expression
 

Definition at line 94 of file functionRemap.h.

Referenced by get_call_str(), and setup_properties().

int FunctionRemap::_first_true_parameter
 

Definition at line 91 of file functionRemap.h.

Referenced by FunctionRemap(), get_call_str(), and setup_properties().

CPPFunctionType* FunctionRemap::_ftype
 

Definition at line 108 of file functionRemap.h.

Referenced by FunctionRemap(), and setup_properties().

string FunctionRemap::_function_signature
 

Definition at line 95 of file functionRemap.h.

Referenced by InterfaceMaker::hash_function_signature(), and setup_properties().

bool FunctionRemap::_has_this
 

Definition at line 90 of file functionRemap.h.

Referenced by FunctionRemap(), get_call_str(), InterfaceMaker::record_function(), setup_properties(), and InterfaceMakerPythonSimple::write_function_instance().

string FunctionRemap::_hash
 

Definition at line 96 of file functionRemap.h.

Referenced by InterfaceMaker::hash_function_signature(), and InterfaceMaker::make_function_remap().

bool FunctionRemap::_is_valid
 

Definition at line 110 of file functionRemap.h.

Referenced by FunctionRemap(), and InterfaceMaker::make_function_remap().

bool FunctionRemap::_manage_reference_count
 

Definition at line 103 of file functionRemap.h.

Referenced by FunctionRemap(), InterfaceMaker::manage_return_value(), and setup_properties().

int FunctionRemap::_num_default_parameters
 

Definition at line 92 of file functionRemap.h.

Referenced by FunctionRemap(), setup_properties(), and write_orig_prototype().

Parameters FunctionRemap::_parameters
 

Definition at line 87 of file functionRemap.h.

Referenced by get_call_str(), make_wrapper_entry(), setup_properties(), InterfaceMakerC::write_function_header(), InterfaceMakerPythonSimple::write_function_instance(), and InterfaceMakerPythonObj::write_function_instance().

ParameterRemap* FunctionRemap::_return_type
 

Definition at line 88 of file functionRemap.h.

Referenced by call_function(), FunctionRemap(), make_wrapper_entry(), InterfaceMaker::manage_return_value(), InterfaceMaker::output_ref(), InterfaceMakerPythonSimple::pack_return_value(), InterfaceMakerPythonObj::pack_return_value(), setup_properties(), InterfaceMakerC::write_function_header(), InterfaceMakerPythonSimple::write_function_instance(), and InterfaceMakerPythonObj::write_function_instance().

FunctionIndex FunctionRemap::_return_value_destructor
 

Definition at line 102 of file functionRemap.h.

Referenced by FunctionRemap(), make_wrapper_entry(), and setup_properties().

bool FunctionRemap::_return_value_needs_management
 

Definition at line 101 of file functionRemap.h.

Referenced by FunctionRemap(), InterfaceMakerPythonObj::pack_return_value(), and setup_properties().

Type FunctionRemap::_type
 

Definition at line 93 of file functionRemap.h.

Referenced by call_function(), FunctionRemap(), get_call_str(), InterfaceMaker::output_ref(), and setup_properties().

string FunctionRemap::_unique_name
 

Definition at line 97 of file functionRemap.h.

Referenced by InterfaceMaker::make_function_remap(), make_wrapper_entry(), InterrogateBuilder::write_code(), and InterfaceMakerPythonSimple::write_module().

bool FunctionRemap::_void_return
 

Definition at line 89 of file functionRemap.h.

Referenced by FunctionRemap(), make_wrapper_entry(), setup_properties(), InterfaceMakerC::write_function_header(), InterfaceMakerPythonSimple::write_function_instance(), and InterfaceMakerPythonObj::write_function_instance().

FunctionWrapperIndex FunctionRemap::_wrapper_index
 

Definition at line 99 of file functionRemap.h.

Referenced by FunctionRemap(), make_wrapper_entry(), InterrogateBuilder::remap_indices(), and InterrogateBuilder::write_code().

string FunctionRemap::_wrapper_name
 

Definition at line 98 of file functionRemap.h.

Referenced by InterfaceMaker::make_function_remap(), make_wrapper_entry(), InterrogateBuilder::write_code(), InterfaceMakerC::write_function_header(), InterfaceMakerPythonSimple::write_function_instance(), InterfaceMakerPythonSimple::write_module(), and InterfaceMakerPythonSimple::write_prototype_for().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:34:56 2003 for DTool by doxygen1.3