ChimeraTK-ApplicationCore  04.01.00
ModuleGroup.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  class Application;
15 
16  class ModuleGroup : public Module {
17  public:
25  ModuleGroup(ModuleGroup* owner, const std::string& name, const std::string& description,
26  const std::unordered_set<std::string>& tags = {});
27 
29  ModuleGroup() = default;
30 
32  ModuleGroup(ModuleGroup&& other) noexcept { operator=(std::move(other)); }
33 
35  ModuleGroup& operator=(ModuleGroup&& other) noexcept;
36 
37  ModuleType getModuleType() const override { return ModuleType::ModuleGroup; }
38 
41 
42  std::string getVirtualQualifiedName() const override;
43 
44  void unregisterModule(Module* module) override;
45 
46  private:
47  friend class Application;
48  friend class DeviceModule;
49 
51  explicit ModuleGroup(ModuleGroup* owner, const std::string& name);
52 
55  friend class ChimeraTK::Model::Impl;
56  };
57 
58 } /* namespace ChimeraTK */
ChimeraTK::Model::Impl
Implementation class for the model.
Definition: Model.h:1358
ChimeraTK::ModuleGroup::getModuleType
ModuleType getModuleType() const override
Return the module type of this module, or in case of a VirtualModule the module type this VirtualModu...
Definition: ModuleGroup.h:37
ChimeraTK::ModuleGroup
Definition: ModuleGroup.h:16
ChimeraTK::ModuleGroup::ModuleGroup
ModuleGroup()=default
Default constructor to allow late initialisation of module groups.
pybind11::module
module_ module
Definition: PyModuleGroup.h:12
ChimeraTK::DeviceModule
Definition: DeviceModule.h:20
ChimeraTK::ModuleGroup::getVirtualQualifiedName
std::string getVirtualQualifiedName() const override
Definition: ModuleGroup.cc:42
ChimeraTK::ModuleGroup::operator=
ModuleGroup & operator=(ModuleGroup &&other) noexcept
Move assignment.
Definition: ModuleGroup.cc:30
ChimeraTK::EntityOwner::ModuleType
ModuleType
Definition: EntityOwner.h:117
ChimeraTK::Model::ModuleGroupProxy
Definition: Model.h:274
ChimeraTK::ModuleGroup::ModuleGroup
ModuleGroup(ModuleGroup &&other) noexcept
Move constructor.
Definition: ModuleGroup.h:32
Model.h
ChimeraTK::ModuleGroup::getModel
ChimeraTK::Model::ModuleGroupProxy getModel()
Return the application model proxy representing this module.
Definition: ModuleGroup.h:40
ChimeraTK::NodeType::Application
@ Application
Module.h
ChimeraTK::ModuleGroup::unregisterModule
void unregisterModule(Module *module) override
Unregister another module as a sub-module.
Definition: ModuleGroup.cc:48
ChimeraTK
InvalidityTracer application module.
Definition: spec_dataValidityPropagation.dox:2
ChimeraTK::EntityOwner::ModuleType::ModuleGroup
@ ModuleGroup
ChimeraTK::Module
Base class for ApplicationModule and DeviceModule, to have a common interface for these module types.
Definition: Module.h:21
ChimeraTK::Application
Definition: Application.h:48