StatechartGroup.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package
19  * @author
20  * @date
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
26 #include <memory>
27 #include <QString>
28 #include <QList>
29 #include "StatechartGroupDefs.h"
30 #include <filesystem>
31 
33 
34 namespace armarx
35 {
36 
38  {
39  public:
40  enum WriteAccess { eReadOnly = 0, eWritable = 1 };
41  StatechartGroup(QString definitionFilePath, QString groupPath, QString name, QString description, QString packageName, const QList<QString>& proxies, bool generateContext, const QMap<QString, QString>& statechartGroupConfigurations, WriteAccess writable);
43 
44  QString getName() const;
45  QString getDefinitionFilePath() const;
46  QString getGroupPath() const;
47  std::filesystem::path getBoostGroupPath() const;
48  std::filesystem::path getBoostDefinitionFilePath() const;
49  QString getDescription() const;
50  const QMap<QString, QString>& getConfigurations() const;
51  QList<QString> getProxies() const;
52  bool contextGenerationEnabled() const;
53  void setContextGeneration(bool generateContext);
54  bool existsCMakeLists() const;
55  void setRootNode(StateTreeNodePtr rootNode);
57  QVector<StateTreeNodePtr> getAllNodes() const;
58  QVector<statechartmodel::StatePtr> getAllStates(bool localOnly = true) const;
59 
60  QString getPackageName() const;
61  QString getPackagePath() const;
62 
63  void setDescription(const QString& description);
64  void setProxies(const QList<QString> proxies);
65  void setConfigurations(const QMap<QString, QString>& statechartGroupConfigurations);
67 
68  private:
69  QString definitionFilePath;
70  QString groupPath;
71  QString name;
72  QString description;
73  QString packageName;
74  StateTreeNodePtr rootNode;
75  QList<QString> proxies;
76  bool generateContext;
77  WriteAccess writable;
78  QMap<QString, QString> statechartGroupConfigurations;
79  };
80 
81 }
StatechartGroupDefs.h
armarx::StatechartGroup::getGroupPath
QString getGroupPath() const
Definition: StatechartGroup.cpp:58
armarx::StatechartGroup::contextGenerationEnabled
bool contextGenerationEnabled() const
Definition: StatechartGroup.cpp:87
armarx::StatechartGroup::StatechartGroup
StatechartGroup(QString definitionFilePath, QString groupPath, QString name, QString description, QString packageName, const QList< QString > &proxies, bool generateContext, const QMap< QString, QString > &statechartGroupConfigurations, WriteAccess writable)
Definition: StatechartGroup.cpp:32
armarx::StatechartGroup::existsCMakeLists
bool existsCMakeLists() const
Definition: StatechartGroup.cpp:97
armarx::StateTreeNodePtr
std::shared_ptr< StateTreeNode > StateTreeNodePtr
Definition: StatechartGroupDefs.h:31
armarx::StatechartGroup::WriteAccess
WriteAccess
Definition: StatechartGroup.h:40
armarx::StatechartGroup::eWritable
@ eWritable
Definition: StatechartGroup.h:40
armarx::StatechartGroup::getConfigurations
const QMap< QString, QString > & getConfigurations() const
Definition: StatechartGroup.cpp:77
armarx::StatechartGroup::getDefinitionFilePath
QString getDefinitionFilePath() const
Definition: StatechartGroup.cpp:53
armarx::StatechartGroup::getBoostDefinitionFilePath
std::filesystem::path getBoostDefinitionFilePath() const
Definition: StatechartGroup.cpp:68
armarx::StatechartGroup
Definition: StatechartGroup.h:37
armarx::StatechartGroup::eReadOnly
@ eReadOnly
Definition: StatechartGroup.h:40
armarx::StatechartGroup::getWriteAccess
WriteAccess getWriteAccess()
Definition: StatechartGroup.cpp:150
armarx::StatechartGroup::getName
QString getName() const
Definition: StatechartGroup.cpp:49
armarx::StatechartGroup::getBoostGroupPath
std::filesystem::path getBoostGroupPath() const
Definition: StatechartGroup.cpp:63
armarx::StatechartGroup::getRootNode
StateTreeNodePtr getRootNode()
Definition: StatechartGroup.cpp:45
armarx::StatechartGroup::getDescription
QString getDescription() const
Definition: StatechartGroup.cpp:72
armarx::StatechartGroup::getProxies
QList< QString > getProxies() const
Definition: StatechartGroup.cpp:82
armarx::StatechartGroup::getAllNodes
QVector< StateTreeNodePtr > getAllNodes() const
Definition: StatechartGroup.cpp:112
armarx::StatechartGroup::findNodeByStateName
StateTreeNodePtr findNodeByStateName(QString name)
Definition: StatechartGroup.cpp:107
armarx::StatechartGroup::setConfigurations
void setConfigurations(const QMap< QString, QString > &statechartGroupConfigurations)
Definition: StatechartGroup.cpp:145
armarx::StatechartGroup::getPackageName
QString getPackageName() const
Definition: StatechartGroup.cpp:124
armarx::StatechartGroup::setDescription
void setDescription(const QString &description)
Definition: StatechartGroup.cpp:135
armarx::StatechartGroup::getPackagePath
QString getPackagePath() const
Definition: StatechartGroup.cpp:129
armarx::StatechartGroup::setRootNode
void setRootNode(StateTreeNodePtr rootNode)
Definition: StatechartGroup.cpp:102
armarx::StatechartGroup::getAllStates
QVector< statechartmodel::StatePtr > getAllStates(bool localOnly=true) const
Definition: StatechartGroup.cpp:119
State.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::StatechartGroup::setContextGeneration
void setContextGeneration(bool generateContext)
Definition: StatechartGroup.cpp:92
armarx::StatechartGroup::setProxies
void setProxies(const QList< QString > proxies)
Definition: StatechartGroup.cpp:140