Bases: object
Parameters: | decl – pygccxml declaration_t object |
---|
Bases: pybindgen.gccxmlparser.ModuleParserWarning
Warning for pybindgen GccxmlParser to report a problem in annotations.
Bases: pybindgen.settings.ErrorHandler
Bases: object
Parameters: | root_module – the root L{Module} object |
---|
Bases: object
Attr enable_anonymous_containers: | |
---|---|
if True, pybindgen will attempt to scan for all std containers, even the ones that have no typedef’ed name. Enabled by default. |
Creates an object that will be able parse header files and create a pybindgen module definition.
Parameters: |
|
---|
Add a function to be called right after converting a gccxml definition to a PyBindGen wrapper object. This hook function will be called for every scanned type, function, or method. It will be called like this:
post_scan_hook(module_parser, pygccxml_definition, pybindgen_wrapper)
where:
module_parser – the ModuleParser (this class) instance
pygccxml_definition – the definition reported by pygccxml
- pybindgen_wrapper – a pybindgen object that generates a wrapper,
such as CppClass, Function, or CppMethod.
Add a function to be called right before converting a gccxml definition to a PyBindGen wrapper object. This hook function will be called for every scanned type, function, or method, and given the a chance to modify the annotations for that definition. It will be called like this::
pre_scan_hook(module_parser, pygccxml_definition, global_annotations,
parameter_annotations)
where:
module_parser – the ModuleParser (this class) instance
pygccxml_definition – the definition reported by pygccxml
- global_annotations – a dicionary containing the “global annotations”
for the definition, i.e. a set of key=value pairs not associated with any particular parameter
- parameter_annotations – a dicionary containing the “parameter
annotations” for the definition. It is a dict whose keys are parameter names and whose values are dicts containing the annotations for that parameter. Annotations pertaining the return value of functions or methods are denoted by a annotation for a parameter named ‘return’.
parses a set of header files and returns a pybindgen Module instance. It is equivalent to calling the following methods:
- parse_init(header_files, include_paths, whitelist_paths)
- scan_types()
- scan_methods()
- scan_functions()
- parse_finalize()
The documentation for L{ModuleParser.parse_init} explains the parameters.
Prepares to parse a set of header files. The following methods should then be called in order to finish the rest of scanning process:
- scan_types()
- scan_methods()
- scan_functions()
- parse_finalize()
Parameters: |
|
---|
Bases: exceptions.Warning
Base class for all warnings reported here.
Bases: pybindgen.gccxmlparser.ModuleParserWarning
Warning for pybindgen GccxmlParser, to report something pybindgen does not support.
Bases: object
This is a pure virtual method that must be implemented by subclasses. It will be called by PyBindGen for every API definition, and should return a section name.
Parameters: | pygccxml_definition – gccxml definition object |
---|---|
Returns: | section name |
This is a pure virtual method that may (or not) be implemented by subclasses. It will be called by PyBindGen for every API definition, and should return the precedence of a section. This is used when sections reflect ‘modules’ whose types must be registered in a certain order.
Parameters: | section_name – the name of the section |
---|---|
Returns: | order of precedence of the section. The lower the number, the sooner the section is to be registered. |
Bases: object
Class to hold information about a python generation section
Parameters: |
|
---|
Bases: pybindgen.gccxmlparser.ModuleParserWarning
Warning for pybindgen GccxmlParser, to be used when a C++ definition cannot be converted to a pybindgen wrapper.
removes const from the type definition
If type is not const type, it will be returned as is
removes pointer from the type definition
If type is not pointer type, it will be returned as is.
removes reference from the type definition
If type is not reference type, it will be returned as is.