ChimeraTK-ApplicationCore  04.01.00
VariableGroup.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 "Model.h"
6 #include "Module.h"
7 
8 #include <boost/thread.hpp>
9 
10 #include <list>
11 
12 namespace ChimeraTK {
13 
14  /********************************************************************************************************************/
15 
16  class ApplicationModule;
17  class ModuleGroup;
18  struct ConfigReader;
19 
20  /********************************************************************************************************************/
21 
22  class VariableGroup : public Module {
23  public:
32  VariableGroup(VariableGroup* owner, const std::string& name, const std::string& description,
33  const std::unordered_set<std::string>& tags = {});
34 
38  VariableGroup() = default;
39 
41  VariableGroup(VariableGroup&& other) noexcept { operator=(std::move(other)); }
42  VariableGroup(const VariableGroup& other) noexcept = delete;
43 
45  VariableGroup& operator=(VariableGroup&& other) noexcept;
46  VariableGroup& operator=(const VariableGroup& other) noexcept = delete;
47 
48  ModuleType getModuleType() const override { return ModuleType::VariableGroup; }
49 
52 
53  std::string getVirtualQualifiedName() const override;
54 
55  void unregisterModule(Module* module) override;
56 
57  protected:
59  friend class ChimeraTK::Model::Impl;
60 
61  private:
62  friend class ApplicationModule;
63 
64  VariableGroup(ModuleGroup* owner, const std::string& name, const std::string& description,
65  const std::unordered_set<std::string>& tags = {});
66  };
67 
68  /********************************************************************************************************************/
69 
70 } /* namespace ChimeraTK */
ChimeraTK::Model::Impl
Implementation class for the model.
Definition: Model.h:1358
ChimeraTK::VariableGroup::getModuleType
ModuleType getModuleType() const override
Return the module type of this module, or in case of a VirtualModule the module type this VirtualModu...
Definition: VariableGroup.h:48
ChimeraTK::ModuleGroup
Definition: ModuleGroup.h:16
ChimeraTK::VariableGroup::getVirtualQualifiedName
std::string getVirtualQualifiedName() const override
Definition: VariableGroup.cc:56
ChimeraTK::EntityOwner::ModuleType::VariableGroup
@ VariableGroup
pybind11::module
module_ module
Definition: PyModuleGroup.h:12
ChimeraTK::VariableGroup::VariableGroup
VariableGroup()=default
Default constructor: Allows late initialisation of VariableGroups (e.g.
ChimeraTK::EntityOwner::ModuleType
ModuleType
Definition: EntityOwner.h:117
ChimeraTK::ApplicationModule
Definition: ApplicationModule.h:24
ChimeraTK::VariableGroup::getModel
ChimeraTK::Model::VariableGroupProxy getModel()
Return the application model proxy representing this module.
Definition: VariableGroup.h:51
ChimeraTK::VariableGroup
Definition: VariableGroup.h:22
Model.h
ChimeraTK::VariableGroup::operator=
VariableGroup & operator=(VariableGroup &&other) noexcept
Move assignment.
Definition: VariableGroup.cc:38
ChimeraTK::VariableGroup::unregisterModule
void unregisterModule(Module *module) override
Unregister another module as a sub-module.
Definition: VariableGroup.cc:62
ChimeraTK::VariableGroup::_model
ChimeraTK::Model::VariableGroupProxy _model
Definition: VariableGroup.h:58
ChimeraTK::Model::VariableGroupProxy
Definition: Model.h:328
ChimeraTK::VariableGroup::VariableGroup
VariableGroup(VariableGroup &&other) noexcept
Move constructor.
Definition: VariableGroup.h:41
Module.h
ChimeraTK
InvalidityTracer application module.
Definition: spec_dataValidityPropagation.dox:2
ChimeraTK::Module
Base class for ApplicationModule and DeviceModule, to have a common interface for these module types.
Definition: Module.h:21