Newer
Older
Martin Christoph Hierholzer
committed
/*
* ModuleGroup.h
*
* Created on: Aug 23, 2017
* Author: Martin Hierholzer
*/
#ifndef CHIMERATK_MODULE_GROUP_H
#define CHIMERATK_MODULE_GROUP_H
#include <list>
#include <boost/thread.hpp>
Martin Christoph Hierholzer
committed
#include "ModuleImpl.h"
Martin Christoph Hierholzer
committed
namespace ChimeraTK {
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class ModuleGroup : public ModuleImpl {
public:
/** Constructor: register the ModuleGroup with its owner. If
* eliminateHierarchy is true, the hierarchy level introduced by this group
* will be eliminated from the "dynamic" data model (see
* EntityOwner::setEliminateHierarchy()). The tags given as the last argument
* are added to all variables in this module recursively (see
* EntityOwner::addTag()).
*
* Note: ModuleGroups may only be owned by the Application or other
* ModuleGroups. */
ModuleGroup(EntityOwner *owner, const std::string &name,
const std::string &description, bool eliminateHierarchy = false,
const std::unordered_set<std::string> &tags = {});
/** Default constructor: Allows late initialisation of ModuleGroups (e.g. when
* creating arrays of ModuleGroups).
*
* This construtor also has to be here to mitigate a bug in gcc. It is needed
* to allow constructor inheritance of modules owning other modules. This
* constructor will not actually be called then. See this bug report:
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67054 */
ModuleGroup() : ModuleImpl() {}
/** Move constructor */
ModuleGroup(ModuleGroup &&other) { operator=(std::move(other)); }
/** Move assignment */
ModuleGroup &operator=(ModuleGroup &&other) {
ModuleImpl::operator=(std::move(other));
return *this;
}
/** Destructor */
virtual ~ModuleGroup(){};
ModuleType getModuleType() const override { return ModuleType::ModuleGroup; }
};
Martin Christoph Hierholzer
committed
} /* namespace ChimeraTK */
#endif /* CHIMERATK_MODULE_GROUP_H */