[pygccxml-commit] source/pyplusplus/module_creator creator.py,1.60,1.61
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <mb...@us...> - 2006-03-10 10:57:36
|
Update of /cvsroot/pygccxml/source/pyplusplus/module_creator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21571/module_creator Modified Files: creator.py Log Message: Added doc strings Index: creator.py =================================================================== RCS file: /cvsroot/pygccxml/source/pyplusplus/module_creator/creator.py,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** creator.py 8 Mar 2006 09:30:34 -0000 1.60 --- creator.py 10 Mar 2006 10:57:31 -0000 1.61 *************** *** 17,20 **** --- 17,33 ---- class creator_t( declarations.decl_visitor_t ): + """Creating code creators. + + This class takes a set of declarations as input and creates a code + creator tree that contains the Boost.Python C++ source code for the + final extension module. Each node in the code creators tree represents + a block of text (C++ source code). + + Usage of this class: Create an instance and pass all relevant input + data to the constructor. Then call L{create()} to obtain the code + creator tree whose root node is a L{module_t<code_creators.module_t>} + object representing the source code for the entire extension module. + """ + def __init__( self , decls *************** *** 25,28 **** --- 38,58 ---- , types_db=None , target_configuration=None ): + """Constructor. + + @param decls: Declarations that should be exposed in the final module. + @param module_name: The name of the final module. + @param boost_python_ns_name: The alias for the boost::python namespace. + @param create_castinig_constructor: ...todo... + @param call_policies_resolver_: Callable that takes one declaration (calldef_t) as input and returns a call policy object which should be used for this declaration. + @param types_db: ...todo... + @param target_configuration: A target configuration object can be used to customize the generated source code to a particular compiler or a particular version of Boost.Python. + @type decls: list of declaration_t + @type module_name: str + @type boost_python_ns_name: str + @type create_castinig_constructor: bool + @type call_policies_resolver_: callable + @type types_db: L{types_database_t<types_database.types_database_t>} + @type target_configuration: L{target_configuration_t<code_creators.target_configuration_t>} + """ declarations.decl_visitor_t.__init__(self) *************** *** 281,286 **** """Create and return the module for the extension. ! declHeaders: If None the headers for the wrapped decls are automatically found. But you can pass a list of headers here to override that search. """ if not decl_headers: --- 311,318 ---- """Create and return the module for the extension. ! @param decl_headers: If None the headers for the wrapped decls are automatically found. But you can pass a list of headers here to override that search. + @returns: Returns the root of the code creators tree + @rtype: L{module_t<code_creators.module_t>} """ if not decl_headers: *************** *** 289,292 **** --- 321,325 ---- for h in decl_headers: self.__extmodule.adopt_include(code_creators.include_t(header=h)) + # Invoke the appropriate visit_*() method on all decls for decl in self.__decls: self.__curr_decl = decl |