rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Event.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: Event.h 1139 2016-07-20 14:57:28Z landolfa $
25  */
26 
27 #ifndef SCXML4CPP_EVENT_H
28 #define SCXML4CPP_EVENT_H
29 
30 #ifndef __cplusplus
31 #error This is a C++ include file and cannot be used from plain C
32 #endif
33 
34 #include <string>
35 
36 namespace scxml4cpp {
37 
38 class Event
39 {
40  public:
41  enum EventType{
47  };
48 
55  };
56 
57  Event();
58  Event(const std::string& id, const EventType type);
59  Event(const Event& e);
60  Event& operator=(const Event& e);
61  virtual ~Event();
62 
63  const std::string& getId() const;
64  const EventType getType() const;
65  const EventStatus getStatus() const;
66  void* getPayload() const;
67 
68  void setId(const std::string& id);
69  void setType(const EventType type);
70  void setStatus(const EventStatus status);
71  void setPayload(void* payload);
72 
73  bool isNull() const;
74 
75  private:
76  std::string mId;
77  EventType mType;
78  EventStatus mStatus;
79  void* mPayload;
80 };
81 
82 } // namespace scxml4cpp
83 
84 #endif // SCXML4CPP_EVENT_H
const EventStatus getStatus() const
Definition: Event.cpp:95
Definition: Event.h:45
virtual ~Event()
Definition: Event.cpp:78
bool isNull() const
Definition: Event.cpp:131
Definition: Event.h:42
Definition: Event.h:46
Event & operator=(const Event &e)
Definition: Event.cpp:65
Definition: Event.h:53
Definition: Event.h:54
Definition: Event.h:50
void setPayload(void *payload)
Definition: Event.cpp:125
void * getPayload() const
Definition: Event.cpp:101
void setId(const std::string &id)
Definition: Event.cpp:107
EventType
Definition: Event.h:41
Definition: Event.h:43
Definition: Event.h:52
const std::string & getId() const
Definition: Event.cpp:83
void setType(const EventType type)
Definition: Event.cpp:113
Definition: Event.h:51
Event()
Definition: Event.cpp:32
Definition: Event.h:38
EventStatus
Definition: Event.h:49
const EventType getType() const
Definition: Event.cpp:89
void setStatus(const EventStatus status)
Definition: Event.cpp:119
Definition: Event.h:44