StateRenamer.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 <QVector>
27
#include <QPair>
28
29
#include <
ArmarXGui/gui-plugins/StatechartViewerPlugin/model/State.h
>
30
#include <
ArmarXGui/gui-plugins/StatechartEditorPlugin/model/StateTreeNode.h
>
31
32
#include <
ArmarXGui/gui-plugins/StatechartEditorPlugin/model/StatechartGroup.h
>
33
34
#include <
ArmarXCore/core/rapidxml/wrapper/RapidXmlReader.h
>
35
#include <
ArmarXCore/core/rapidxml/wrapper/RapidXmlWriter.h
>
36
37
namespace
armarx
38
{
39
40
class
StateRenamer
41
{
42
43
public
:
44
struct
InstanceRenameInfo
45
{
46
StatechartGroupPtr
group
;
47
StateTreeNodePtr
parentState
;
48
QString
fromName
;
49
QString
toName
;
50
};
51
52
static
bool
RenameState
(
const
QVector<InstanceRenameInfo>& instanceRenameInfos,
53
const
StateTreeNodePtr
& state,
54
const
QString& newStateName,
55
const
StatechartGroupPtr
& group);
56
57
private
:
58
static
void
RenameStateInstances(
const
QVector<InstanceRenameInfo>& instanceRename);
59
static
bool
RenameStateClass(
const
StateTreeNodePtr
& state,
const
QString& newStateName);
60
static
bool
AdjustStatechartGroupFile(
const
StatechartGroupPtr
& group,
const
StateTreeNodePtr
& state,
const
QString& newName);
61
62
static
bool
AttemptMoveTo(
const
QString&
source
,
const
QString&
target
);
63
};
64
}
65
armarx::StateRenamer::InstanceRenameInfo
Definition:
StateRenamer.h:44
armarx::StateTreeNodePtr
std::shared_ptr< StateTreeNode > StateTreeNodePtr
Definition:
StatechartGroupDefs.h:31
armarx::StateRenamer::InstanceRenameInfo::group
StatechartGroupPtr group
Definition:
StateRenamer.h:46
armarx::StateRenamer::InstanceRenameInfo::parentState
StateTreeNodePtr parentState
Definition:
StateRenamer.h:47
boost::target
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition:
point_cloud_graph.h:688
RapidXmlWriter.h
armarx::StateRenamer::InstanceRenameInfo::fromName
QString fromName
Definition:
StateRenamer.h:48
StatechartGroup.h
boost::source
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Definition:
point_cloud_graph.h:681
armarx::StatechartGroupPtr
std::shared_ptr< StatechartGroup > StatechartGroupPtr
Definition:
StatechartGroupDefs.h:34
RapidXmlReader.h
armarx::StateRenamer::InstanceRenameInfo::toName
QString toName
Definition:
StateRenamer.h:49
armarx::StateRenamer::RenameState
static bool RenameState(const QVector< InstanceRenameInfo > &instanceRenameInfos, const StateTreeNodePtr &state, const QString &newStateName, const StatechartGroupPtr &group)
Definition:
StateRenamer.cpp:41
State.h
StateTreeNode.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
armarx::StateRenamer
Definition:
StateRenamer.h:40
ArmarXGui
gui-plugins
StatechartEditorPlugin
renaming
StateRenamer.h
Generated on Sat Oct 12 2024 09:14:03 for armarx_documentation by
1.8.17