StateParameter.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @package ArmarX::
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2014
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
25#include <memory>
26
27#include <QMap>
28#include <QPair>
29#include <QString>
30
31#include <Ice/Handle.h>
32
33#include <ArmarXCore/interface/statechart/StatechartIce.h>
35
36namespace armarx
37{
38 class Variant;
39 using VariantPtr = IceInternal::Handle<Variant>;
40} // namespace armarx
41
43{
44 class StateParameter;
45 using StateParameterPtr = std::shared_ptr<StateParameter>;
46 using StateParameterMap = QMap<QString, StateParameterPtr>;
48 QMap<QString, QPair<VariantContainerBasePtr, QString>>;
49
51 {
52 public:
54 void setDefaultValue(const VariantContainerBasePtr& value);
55 VariantContainerBasePtr getDefaultValue();
56 void setDefaultValueJson(const QString& valueJson);
57 QString getDefaultValueJson();
59 FromIceStateParameter(armarx::StateParameterIceBasePtr param);
60 static armarx::StateParameterIceBasePtr
62 static armarx::StateParameterMap
64
65 QString type;
66 //QString dataType;
67
68 //default values are also part of profileDefaultValues under the name StatechartProfiles::GetRootName()
69 // VariantContainerBasePtr defaultValue;
70 // QString defaultValueJSON; //! Used to store the default value in case the JSON string could not be deserialized
72 QString description;
74 profileDefaultValues; //! Second item in value pair: store the default value in case the JSON string could not be deserialized
75 };
76
77} // namespace armarx::statechartmodel
The Variant class is described here: Variants.
Definition Variant.h:224
StateParameterProfileDefaultValueMap profileDefaultValues
static armarx::StateParameterIceBasePtr ToIceStateParameter(statechartmodel::StateParameterPtr param)
static statechartmodel::StateParameterPtr FromIceStateParameter(armarx::StateParameterIceBasePtr param)
void setDefaultValue(const VariantContainerBasePtr &value)
void setDefaultValueJson(const QString &valueJson)
static armarx::StateParameterMap ToIceStateParameterMap(statechartmodel::StateParameterMap params)
VariantContainerBasePtr getDefaultValue()
QMap< QString, StateParameterPtr > StateParameterMap
QMap< QString, QPair< VariantContainerBasePtr, QString > > StateParameterProfileDefaultValueMap
std::shared_ptr< StateParameter > StateParameterPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Variant > VariantPtr
Definition Variant.h:41