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

InterfaceMakerPythonObj Class Reference

#include <interfaceMakerPythonObj.h>

Inheritance diagram for InterfaceMakerPythonObj:

InterfaceMakerPython InterfaceMaker List of all members.

Public Member Functions

 InterfaceMakerPythonObj (InterrogateModuleDef *def)
virtual ~InterfaceMakerPythonObj ()
virtual void write_prototypes (ostream &out)
virtual void write_functions (ostream &out)
virtual void write_module (ostream &out, InterrogateModuleDef *def)
virtual bool synthesize_this_parameter ()

Static Public Member Functions

string get_builder_name (CPPType *struct_type)

Protected Member Functions

virtual string get_wrapper_prefix ()

Private Types

typedef map< CPPType *, FunctionWriter * > PtrConverter

Private Member Functions

void write_class_wrapper (ostream &out, Object *object)
void write_prototype_for (ostream &out, Function *func)
void write_function_for (ostream &out, Function *func)
void write_function_instance (ostream &out, int indent_level, Function *func, FunctionRemap *remap, string &expected_params)
void pack_return_value (ostream &out, int indent_level, FunctionRemap *remap, string return_expr)
FunctionWriterPtrFromPythonget_ptr_from_python (CPPType *type)
FunctionWriterPtrToPythonget_ptr_to_python (CPPType *type)

Private Attributes

PtrConverter _from_python
PtrConverter _to_python

Member Typedef Documentation

typedef map<CPPType *, FunctionWriter *> InterfaceMakerPythonObj::PtrConverter [private]
 

Definition at line 72 of file interfaceMakerPythonObj.h.


Constructor & Destructor Documentation

InterfaceMakerPythonObj::InterfaceMakerPythonObj InterrogateModuleDef def  ) 
 

Definition at line 39 of file interfaceMakerPythonObj.cxx.

InterfaceMakerPythonObj::~InterfaceMakerPythonObj  )  [virtual]
 

Definition at line 50 of file interfaceMakerPythonObj.cxx.


Member Function Documentation

string InterfaceMakerPythonObj::get_builder_name CPPType struct_type  )  [static]
 

Definition at line 159 of file interfaceMakerPythonObj.cxx.

References InterrogateBuilder::clean_identifier(), CPPType::get_local_name(), and parser.

Referenced by write_class_wrapper(), and FunctionWriterPtrToPython::write_code().

FunctionWriterPtrFromPython * InterfaceMakerPythonObj::get_ptr_from_python CPPType type  )  [private]
 

Definition at line 540 of file interfaceMakerPythonObj.cxx.

References _from_python, InterfaceMaker::_function_writers, FunctionWriters::add_writer(), type, and writer().

Referenced by write_function_instance().

FunctionWriterPtrToPython * InterfaceMakerPythonObj::get_ptr_to_python CPPType type  )  [private]
 

Definition at line 562 of file interfaceMakerPythonObj.cxx.

References InterfaceMaker::_function_writers, _to_python, FunctionWriters::add_writer(), type, and writer().

Referenced by pack_return_value().

string InterfaceMakerPythonObj::get_wrapper_prefix  )  [protected, virtual]
 

Reimplemented from InterfaceMaker.

Definition at line 171 of file interfaceMakerPythonObj.cxx.

void InterfaceMakerPythonObj::pack_return_value ostream out,
int  indent_level,
FunctionRemap remap,
string  return_expr
[private]
 

Definition at line 488 of file interfaceMakerPythonObj.cxx.

References FunctionRemap::_return_type, FunctionRemap::_return_value_needs_management, ParameterRemap::get_new_type(), ParameterRemap::get_orig_type(), get_ptr_to_python(), InterfaceMaker::indent(), TypeManager::is_char_pointer(), TypeManager::is_float(), TypeManager::is_integer(), TypeManager::is_pointer(), ParameterRemap::new_type_is_atomic_string(), parser, type, and writer().

Referenced by write_function_instance().

bool InterfaceMakerPythonObj::synthesize_this_parameter  )  [virtual]
 

Reimplemented from InterfaceMaker.

Definition at line 147 of file interfaceMakerPythonObj.cxx.

void InterfaceMakerPythonObj::write_class_wrapper ostream out,
Object *  object
[private]
 

Definition at line 181 of file interfaceMakerPythonObj.cxx.

References InterrogateType::_cpptype, InterfaceMaker::Object::_itype, InterfaceMaker::Object::_methods, InterrogateBuilder::clean_identifier(), get_builder_name(), CPPType::get_local_name(), CPPType::get_simple_name(), NULL, and parser.

Referenced by write_functions().

void InterfaceMakerPythonObj::write_function_for ostream out,
Function *  func
[private]
 

Definition at line 269 of file interfaceMakerPythonObj.cxx.

References InterfaceMaker::Function::_name, InterfaceMaker::Function::_remaps, write_function_instance(), and FunctionRemap::write_orig_prototype().

Referenced by write_functions().

void InterfaceMakerPythonObj::write_function_instance ostream out,
int  indent_level,
Function *  func,
FunctionRemap remap,
string &  expected_params
[private]
 

Definition at line 313 of file interfaceMakerPythonObj.cxx.

References FunctionRemap::_cppfunc, FunctionRemap::_parameters, FunctionRemap::_return_type, FunctionRemap::_void_return, FunctionRemap::call_function(), ParameterRemap::get_orig_type(), FunctionRemap::get_parameter_name(), get_ptr_from_python(), CPPInstance::get_simple_name(), ParameterRemap::get_temporary_type(), InterfaceMaker::indent(), TypeManager::is_bool(), TypeManager::is_char_pointer(), TypeManager::is_float(), TypeManager::is_integer(), TypeManager::is_pointer(), InterfaceMaker::manage_return_value(), ParameterRemap::new_type_is_atomic_string(), pack_return_value(), parser, ParameterRemap::temporary_to_return(), InterfaceMakerPython::test_assert(), type, vector_string, FunctionRemap::write_orig_prototype(), and writer().

Referenced by write_function_for().

void InterfaceMakerPythonObj::write_functions ostream out  )  [virtual]
 

Reimplemented from InterfaceMaker.

Definition at line 80 of file interfaceMakerPythonObj.cxx.

References InterfaceMaker::_functions, InterfaceMaker::_objects, write_class_wrapper(), write_function_for(), and InterfaceMaker::write_functions().

void InterfaceMakerPythonObj::write_module ostream out,
InterrogateModuleDef def
[virtual]
 

Reimplemented from InterfaceMaker.

Definition at line 105 of file interfaceMakerPythonObj.cxx.

References InterfaceMaker::_objects, InterrogateModuleDef::library_name, and InterfaceMaker::write_module().

void InterfaceMakerPythonObj::write_prototype_for ostream out,
Function *  func
[private]
 

Definition at line 257 of file interfaceMakerPythonObj.cxx.

References InterfaceMaker::Function::_name.

Referenced by write_prototypes().

void InterfaceMakerPythonObj::write_prototypes ostream out  )  [virtual]
 

Reimplemented from InterfaceMaker.

Definition at line 61 of file interfaceMakerPythonObj.cxx.

References InterfaceMaker::_functions, write_prototype_for(), and InterfaceMaker::write_prototypes().


Member Data Documentation

PtrConverter InterfaceMakerPythonObj::_from_python [private]
 

Definition at line 73 of file interfaceMakerPythonObj.h.

Referenced by get_ptr_from_python().

PtrConverter InterfaceMakerPythonObj::_to_python [private]
 

Definition at line 74 of file interfaceMakerPythonObj.h.

Referenced by get_ptr_to_python().


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