rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Context.h
Go to the documentation of this file.
1 /*
2  * scampl4cpp/engine
3  *
4  * Copyright by European Southern Observatory, 2012
5  * All rights reserved
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA.
21  */
22 
23 /*
24  * $Id: Context.h 1139 2016-07-20 14:57:28Z landolfa $
25  */
26 
27 #ifndef SCXML4CPP_CONTEXT_H
28 #define SCXML4CPP_CONTEXT_H
29 
30 #ifndef __cplusplus
31 #error This is a C++ include file and cannot be used from plain C
32 #endif
33 
34 
35 #include <iostream>
36 #include <string>
37 #include <list>
38 
39 namespace scxml4cpp {
40 
41 class Event;
42 
43 class Context
44 {
45  public:
46  Context();
47  Context(const Context& c);
48  Context& operator=(const Context& c);
49  ~Context();
50 
51  const std::string& getName() const;
52  const std::string& getSessionId() const;
53  Event* getLastEvent() const;
54 
55  void setName(const std::string& name);
56  void setSessionId(const std::string& id);
57  void setLastEvent(Event* e);
58 
59  private:
60  std::string mName;
61  std::string mSessionId;
62  Event* mLastEvent;
63 
64 };
65 
66 } // namespace scxml4cpp
67 
68 #endif // SCXML4CPP_CONTEXT_H
Context & operator=(const Context &c)
Definition: Context.cpp:48
~Context()
Definition: Context.cpp:57
Definition: Context.h:43
Context()
Definition: Context.cpp:32
const std::string & getName() const
Definition: Context.cpp:63
const std::string & getSessionId() const
Definition: Context.cpp:69
Definition: Event.h:38
void setName(const std::string &name)
Definition: Context.cpp:81
Event * getLastEvent() const
Definition: Context.cpp:75
void setSessionId(const std::string &id)
Definition: Context.cpp:87
void setLastEvent(Event *e)
Definition: Context.cpp:93