rad 6.2.0
Loading...
Searching...
No Matches
StateHistory.h
Go to the documentation of this file.
1
10/*
11 * scampl4cpp/engine
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_STATEHISTORY_H
33#define SCXML4CPP_STATEHISTORY_H
34
35#ifndef __cplusplus
36#error This is a C++ include file and cannot be used from plain C
37#endif
38
39#ifndef SCXML4CPP_STATE_H
40#include "scxml4cpp/State.h"
41#endif
42
43#include <string>
44
45namespace scxml4cpp
46{
47
57class StateHistory : public State {
58
59 public:
65 Deep
66 };
67
74 StateHistory(const std::string& id, const HistoryType type);
75
80 virtual ~StateHistory();
81
86
90 std::list<State*>& getHistoryValues();
91
95 void clearHistoryValues();
96
101
107 void pushHistoryValue(State* s);
108
114 void setHistoryType(HistoryType type);
115
121 void setHistoryValues(std::list<State*>& historyValues);
122
123 private:
124 HistoryType mType;
125 std::list<State*> mHistoryValues;
126
127 StateHistory(const StateHistory&);
128 StateHistory& operator= (const StateHistory&);
129};
130
131} // namespace scxml4cpp
132
133#endif // SCXML4CPP_STATEHISTORY_H
State header.
Definition StateHistory.h:57
void setHistoryValues(std::list< State * > &historyValues)
Definition StateHistory.cpp:106
HistoryType
Definition StateHistory.h:63
@ Shallow
Definition StateHistory.h:64
@ Deep
Definition StateHistory.h:65
std::list< State * > & getHistoryValues()
Definition StateHistory.cpp:59
HistoryType getHistoryType()
Definition StateHistory.cpp:53
StateHistory(const std::string &id, const HistoryType type)
Definition StateHistory.cpp:41
void setHistoryType(HistoryType type)
Definition StateHistory.cpp:100
virtual ~StateHistory()
Definition StateHistory.cpp:48
State * popHistoryValue()
Definition StateHistory.cpp:72
void pushHistoryValue(State *s)
Definition StateHistory.cpp:85
void clearHistoryValues()
Definition StateHistory.cpp:65
Definition State.h:60
Definition Action.cpp:36