Shiboken::Module Namespace
namespace Shiboken::ModuleNamespace for module-related functionality. More...
| Header: | #include <basewrapper.h> |
Functions
| void | AddTypeCreationFunction(PyObject *module, const char *name, Shiboken::Module::TypeCreationFunction func) |
| PyObject * | create(const char *moduleName, PyModuleDef *moduleData) |
| PyObject * | createOnly(const char *moduleName, PyModuleDef *moduleData) |
| void | exec(PyObject *module) |
| PyTypeObject * | get(Shiboken::Module::TypeInitStruct &typeStruct) |
| SbkConverter ** | getTypeConverters(PyObject *module) |
| Shiboken::Module::TypeInitStruct * | getTypes(PyObject *module) |
| PyObject * | import(const char *moduleName) |
| void | loadLazyClassesWithName(const char *name) |
| void | registerTypeConverters(PyObject *module, SbkConverter **converters) |
| void | registerTypes(PyObject *module, Shiboken::Module::TypeInitStruct *types) |
| bool | replaceModuleDict(PyObject *module, PyObject *modClass, PyObject *dict) |
| void | resolveLazyClasses(PyObject *module) |
Detailed Description
Function Documentation
void Module::AddTypeCreationFunction(PyObject *module, const char *name, Shiboken::Module::TypeCreationFunction func)
Adds a type creation function func for the type name to the module.
PyObject *Module::create(const char *moduleName, PyModuleDef *moduleData)
Creates and returns a new Python module named moduleName using the information passed in moduleData and calls exec() on it.
PyObject *Module::createOnly(const char *moduleName, PyModuleDef *moduleData)
Creates and returns a new Python module named moduleName using the information passed in moduleData. exec() is not called (Support for Nuitka).
void Module::exec(PyObject *module)
Executes the module (multi-phase initialization helper).
PyTypeObject *Module::get(Shiboken::Module::TypeInitStruct &typeStruct)
Returns the type of typeStruct, creating it if needed. PYSIDE-2404: Replacing the arguments in cpythonTypeNameExt by a function.
SbkConverter **Module::getTypeConverters(PyObject *module)
Returns a pointer to the array of converters created by module.
Shiboken::Module::TypeInitStruct *Module::getTypes(PyObject *module)
Returns a pointer to the array of types created by module.
PyObject *Module::import(const char *moduleName)
Imports and returns the module named moduleName, or a nullptr in case of failure. If the module is already imported, it increments its reference count before returning it.
void Module::loadLazyClassesWithName(const char *name)
Makes sure that classes mentioned by name really exist (PYSIDE-2404).
void Module::registerTypeConverters(PyObject *module, SbkConverter **converters)
Registers the list of converters (array of SbkConverter *) created by module for non-wrapper types.
void Module::registerTypes(PyObject *module, Shiboken::Module::TypeInitStruct *types)
Registers the list of types (array of TypeInitStruct representing the types) created by module.
bool Module::replaceModuleDict(PyObject *module, PyObject *modClass, PyObject *dict)
Replaces the dictionary of module by dict, changing its class to modClass. This allows for using __missing__.
Returns true on success, false if the arguments are of the wrong type.
void Module::resolveLazyClasses(PyObject *module)
Incarnates all classes of module for star imports (PYSIDE-2404).