pyplusplus.module_creator.creator.creator_t

Package pyplusplus :: Package module_creator :: Module creator :: Class creator_t |

# type creator_t

source code

                                           object --+
                                                    |
    pygccxml.declarations.decl_visitor.decl_visitor_t --+
                                                        |
                                                       creator_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 create() to obtain the code creator tree whose root node is a module_t object representing the source code for the entire extension module.

Instance Methods
__init__(self, decls, module_name, boost_python_ns_name=`'``bp``'`, call_policies_resolver_=None, types_db=None, target_configuration=None, enable_indexing_suite=True, doc_extractor=None) Constructor. | source code
module_t |
create(self, decl_headers=None) Create and return the module for the extension. | source code
visit_member_function(self) | source code
visit_constructor(self) | source code
visit_destructor(self) | source code
visit_member_operator(self) | source code
visit_casting_operator(self) | source code
visit_free_function(self) | source code
visit_free_operator(self) | source code
visit_class_declaration(self) | source code
expose_overloaded_mem_fun_using_macro(self, cls, cls_creator) | source code
visit_class(self) | source code
visit_enumeration(self) | source code
visit_namespace(self) | source code
visit_typedef(self) | source code
visit_variable(self) | source code

Method Details

### __init__(self, decls, module_name, boost_python_ns_name=`'``bp``'`, call_policies_resolver_=None, types_db=None, target_configuration=None, enable_indexing_suite=True, doc_extractor=None) (Constructor) | source code
Constructor. Parameters: `decls` (list of declaration_t) - Declarations that should be exposed in the final module. `module_name` (str) - The name of the final module. `boost_python_ns_name` (str) - The alias for the boost::python namespace. `call_policies_resolver_` (callable) - Callable that takes one declaration (calldef_t) as input and returns a call policy object which should be used for this declaration. `types_db` (types_database_t) - ...todo... `target_configuration` (target_configuration_t) - A target configuration object can be used to customize the generated source code to a particular compiler or a particular version of Boost.Python. `doc_extractor` (callable) - callable, that takes as argument declaration reference and returns documentation string `already_exposed_dbs` (list of strings) - list of files/directories other modules, this module depends on, generated their code too Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.__init__

### create(self, decl_headers=None) | source code
Create and return the module for the extension. Parameters: `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: module_t Returns the root of the code creators tree

### visit_member_function(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_member_function

### visit_constructor(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_constructor

### visit_destructor(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_destructor

### visit_member_operator(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_member_operator

### visit_casting_operator(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_casting_operator

### visit_free_function(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_free_function

### visit_free_operator(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_free_operator

### visit_class_declaration(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_class_declaration

### visit_class(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_class

### visit_enumeration(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_enumeration

### visit_namespace(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_namespace

### visit_typedef(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_typedef

### visit_variable(self) | source code
Overrides: pygccxml.declarations.decl_visitor.decl_visitor_t.visit_variable