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 {
Martin Christoph Hierholzer
committed
class ModuleGroup : public ModuleImpl {
Martin Christoph Hierholzer
committed
public:
Martin Christoph Hierholzer
committed
/** 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).
Martin Christoph Hierholzer
committed
* 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 */
Martin Christoph Hierholzer
committed
ModuleGroup() : ModuleImpl() {}
Martin Christoph Hierholzer
committed
/** Move constructor */
ModuleGroup(ModuleGroup &&other) { operator=(std::move(other)); }
Martin Christoph Hierholzer
committed
/** Move assignment */
ModuleGroup& operator=(ModuleGroup &&other) {
ModuleImpl::operator=(std::move(other));
return *this;
}
Martin Christoph Hierholzer
committed
/** Destructor */
virtual ~ModuleGroup() {};
ModuleType getModuleType() const override { return ModuleType::ModuleGroup; }
Martin Christoph Hierholzer
committed
};
} /* namespace ChimeraTK */
#endif /* CHIMERATK_MODULE_GROUP_H */