ChimeraTK-ApplicationCore 04.06.00
Loading...
Searching...
No Matches
PyVoidAccessor.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 <pybind11/pybind11.h>
6// pybind11.h must come first
7
9#include "PyTransferElement.h"
10#include "VoidAccessor.h"
11
12#include <ChimeraTK/VariantUserTypes.h>
13
14namespace py = pybind11;
15
16namespace ChimeraTK {
17
18 template<class AccessorType>
19 class VoidTypeTag {};
20
21 /********************************************************************************************************************/
22
23 class PyVoidAccessor : public PyTransferElement<PyVoidAccessor>, public PyOwnedObject {
24 public:
26
27 template<class AccessorType>
28 PyVoidAccessor(VoidTypeTag<AccessorType>, Module* owner, const std::string& name, const std::string& description,
29 const std::unordered_set<std::string>& tags = {});
30
32
33 ~PyVoidAccessor() override;
34
35 static std::string repr(py::object& acc);
36
37 static void bind(py::module& mod);
38
39 // NOLINTNEXTLINE(readability-identifier-naming)
40 mutable std::variant<VoidAccessor> _accessor;
41 };
42
43 /********************************************************************************************************************/
44
45} // namespace ChimeraTK
Base class for ApplicationModule and DeviceModule, to have a common interface for these module types.
Definition Module.h:21
Base class used for all objects in the Python world which can be owned by another object.
PyVoidAccessor(PyVoidAccessor &&)=default
static void bind(py::module &mod)
std::variant< VoidAccessor > _accessor
static std::string repr(py::object &acc)
InvalidityTracer application module.
module_ module