rad 6.2.0
Loading...
Searching...
No Matches
Context.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_CONTEXT_H
33#define SCXML4CPP_CONTEXT_H
34
35#ifndef __cplusplus
36#error This is a C++ include file and cannot be used from plain C
37#endif
38
39
40#include <iostream>
41#include <string>
42#include <list>
43
44namespace scxml4cpp {
45
46class Event;
47
58{
59 public:
63 Context();
64
70 Context(const Context& c);
71
77 Context& operator=(const Context& c);
78
84 ~Context();
85
89 const std::string& getName() const;
90
94 const std::string& getSessionId() const;
95
99 Event* getLastEvent() const;
100
106 void setName(const std::string& name);
107
113 void setSessionId(const std::string& id);
114
120 void setLastEvent(Event* e);
121
122 private:
123 std::string mName;
124 std::string mSessionId;
125 Event* mLastEvent;
126
127};
128
129} // namespace scxml4cpp
130
131#endif // SCXML4CPP_CONTEXT_H
Definition Context.h:58
const std::string & getName() const
Definition Context.cpp:68
~Context()
Definition Context.cpp:62
Event * getLastEvent() const
Definition Context.cpp:80
void setSessionId(const std::string &id)
Definition Context.cpp:92
void setLastEvent(Event *e)
Definition Context.cpp:98
void setName(const std::string &name)
Definition Context.cpp:86
Context()
Definition Context.cpp:37
const std::string & getSessionId() const
Definition Context.cpp:74
Context & operator=(const Context &c)
Definition Context.cpp:53
Definition Event.h:66
Definition Action.cpp:36