ChimeraTK-ApplicationCore 04.06.00
Loading...
Searching...
No Matches
PythonModuleManager.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2// SPDX-License-Identifier: LGPL-3.0-or-later
3#pragma once
4
5#include "PyModuleGroup.h"
6
7#include <functional>
8#include <memory>
9
10namespace ChimeraTK {
11
12 namespace detail {
13 struct PythonModuleManagerImpl;
14 }
15
23 public:
26
28 void deinit();
29
32
34 void createModules(Application& app);
35
44 void setOnMainGroupChange(std::function<void(const std::unique_ptr<PyModuleGroup>&)> callback);
45
46 private:
47 void init();
48
49 std::unique_ptr<detail::PythonModuleManagerImpl> _impl;
50 };
51
52} // namespace ChimeraTK
This class loads and unloads the Python modules as specified in the ConfigReader XML file,...
void createModules(Application &app)
called by Application to load all Python modules specified in the ConfigReader XML file
void setOnMainGroupChange(std::function< void(const std::unique_ptr< PyModuleGroup > &)> callback)
Register callback function to get informed about the main PyModuleGroup which is created by the Pytho...
void deinit()
clean up detail::PythonModuleManagerImpl, in particular py::gil_scoped_release
~PythonModuleManager()
need non-default destructor due to incomplete type detail::PythonModuleManagerImpl
PythonModuleManager()
need non-default constructor due to incomplete type detail::PythonModuleManagerImpl
InvalidityTracer application module.