rad
6.2.0
Loading...
Searching...
No Matches
scxml4cpp
parser
src
include
scxml4cpp
ReplaceRules.h
Go to the documentation of this file.
1
10
/*
11
* scampl4cpp/parser
12
*
13
* Copyright by European Southern Observatory, 2012
14
* All rights reserved
15
*
16
* This library is free software; you can redistribute it and/or
17
* modify it under the terms of the GNU Lesser General Public
18
* License as published by the Free Software Foundation; either
19
* version 2.1 of the License, or (at your option) any later version.
20
*
21
* This library is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24
* Lesser General Public License for more details.
25
*
26
* You should have received a copy of the GNU Lesser General Public
27
* License along with this library; if not, write to the Free Software
28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
29
* 02111-1307 USA.
30
*/
31
32
#ifndef SCXML4CPP_REPLACE_RULES_H
33
#define SCXML4CPP_REPLACE_RULES_H
34
35
#ifndef __cplusplus
36
#error This is a C++ include file and cannot be used from plain C
37
#endif
38
39
#include <string>
40
#include <map>
41
#include <ostream>
42
43
namespace
scxml4cpp
{
44
45
class
Context
;
46
52
class
ReplaceRules
53
{
54
public
:
55
enum
ElementType
{
56
State
= 0,
57
Event
,
58
Guard
,
59
Action
,
60
Activity
61
};
62
66
ReplaceRules
();
67
ReplaceRules
(
const
ReplaceRules
&) =
default
;
68
ReplaceRules
&
operator=
(
const
ReplaceRules
&) =
default
;
69
79
void
add
(
const
ElementType
elementType
,
80
const
std::string&
srcId
,
81
const
std::string&
dstId
);
82
86
void
clear
();
87
95
std::string
apply
(
const
ElementType
elementType
,
const
std::string&
srcId
);
96
100
const
std::map<std::string, std::string>&
get
()
const
;
101
108
friend
std::ostream&
operator<<
(std::ostream&
stream
,
const
ReplaceRules
&
rules
);
109
110
private
:
111
std::map<std::string, std::string> mRules;
112
std::map<ElementType, std::string> mPrefixes;
113
};
114
115
}
// namespace scxml4cpp
116
117
#endif
// SCXML4CPP_REPLACE_RULES_H
scxml4cpp::Activity
Definition
Activity.h:52
scxml4cpp::ReplaceRules
Definition
ReplaceRules.h:53
scxml4cpp::ReplaceRules::ReplaceRules
ReplaceRules()
Definition
ReplaceRules.cpp:38
scxml4cpp::ReplaceRules::operator<<
friend std::ostream & operator<<(std::ostream &stream, const ReplaceRules &rules)
Definition
ReplaceRules.cpp:83
scxml4cpp::ReplaceRules::ElementType
ElementType
Definition
ReplaceRules.h:55
scxml4cpp::ReplaceRules::Guard
@ Guard
Definition
ReplaceRules.h:58
scxml4cpp::ReplaceRules::Event
@ Event
Definition
ReplaceRules.h:57
scxml4cpp::ReplaceRules::Action
@ Action
Definition
ReplaceRules.h:59
scxml4cpp::ReplaceRules::apply
std::string apply(const ElementType elementType, const std::string &srcId)
Definition
ReplaceRules.cpp:63
scxml4cpp::ReplaceRules::add
void add(const ElementType elementType, const std::string &srcId, const std::string &dstId)
Definition
ReplaceRules.cpp:49
scxml4cpp::ReplaceRules::ReplaceRules
ReplaceRules(const ReplaceRules &)=default
scxml4cpp::ReplaceRules::clear
void clear()
Definition
ReplaceRules.cpp:57
scxml4cpp::ReplaceRules::get
const std::map< std::string, std::string > & get() const
Definition
ReplaceRules.cpp:76
scxml4cpp::ReplaceRules::operator=
ReplaceRules & operator=(const ReplaceRules &)=default
scxml4cpp::State
Definition
State.h:60
scxml4cpp
Definition
Action.cpp:36
Context
Definition
testCoroActivity.cpp:16
Generated by
1.10.0