pyplusplus.code_creators.module.module_t

Package pyplusplus :: Package code_creators :: Module module :: Class module_t |

# type module_t

source code

                     object --+
                              |
    code_creator.code_creator_t --+
                                  |
                compound.compound_t --+
                                      |
                                     module_t

This class represents the source code for the entire extension module.

The root of the code creator tree is always a module_t object.

Instance Methods
__init__(self, global_ns) Constructor. | source code
int |
last_include_index(self) Return the children index of the last include_t object. | source code
replace_included_headers(self, headers, leave_system_headers=True) | source code
adopt_include(self, include_creator) Insert an include_t object. | source code
do_include_dirs_optimization(self) | source code
add_include(self, header, user_defined=True, system=False) | source code
add_namespace_usage(self, namespace_name) | source code
add_namespace_alias(self, alias, full_namespace_name) | source code
adopt_declaration_creator(self, creator) | source code
add_declaration_code(self, code, position) | source code
Inherited from `compound.compound_t`: `adopt_creator`, `adopt_creators`, `get_system_headers`, `remove_creator` Inherited from `code_creator.code_creator_t`: `beautify`, `create`

Static Methods
Inherited from `compound.compound_t`: `create_internal_code` Inherited from `code_creator.code_creator_t`: `indent`, `is_comment`, `unindent`, `unique_headers`

Class Variables
Inherited from `code_creator.code_creator_t`: `LINE_LENGTH`, `PARAM_SEPARATOR`, `PYPLUSPLUS_NS_NAME`

Properties
| global_ns reference to global_ns ( namespace_t ) declaration
| std_directories
| user_defined_directories
| body Return reference to module_body_t code creator
str or license_t | license License text.
| specially_exposed_decls Convert a method into a cached attribute
Inherited from `compound.compound_t`: `creators` Inherited from `code_creator.code_creator_t`: `parent`, `target_configuration`, `top_parent`, `works_on_instance`

Method Details

### __init__(self, global_ns) (Constructor) | source code
Constructor. Parameters: `parent` - Parent code creator. Overrides: code_creator.code_creator_t.__init__

### last_include_index(self) | source code
Return the children index of the last include_t object. An exception is raised when there is no include_t object among the children creators. Returns: int Children index

### adopt_include(self, include_creator) | source code
Insert an include_t object. The include creator is inserted right after the last include file. Parameters: `include_creator` (include_t) - Include creator object

Property Details

### global_ns reference to global_ns ( namespace_t ) declaration

### std_directories Get Method: _get_std_directories(self)

### user_defined_directories Get Method: _get_user_defined_directories(self)

### body Return reference to module_body_t code creator

### license License text. The license text will always be the first children node. Get Method: _get_license(self) Set Method: _set_license(self, license_text) Type: str or license_t

### specially_exposed_decls Convert a method into a cached attribute