rad 6.2.0
Loading...
Searching...
No Matches
Event.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_EVENT_H
33#define SCXML4CPP_EVENT_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
41namespace scxml4cpp {
42
65class Event
66{
67 public:
68
79
90
98 Event();
99
109 Event(const std::string& id, const EventType type);
110
114 Event(const Event& e);
115
119 Event& operator=(const Event& e);
120
126 virtual ~Event();
127
131 const std::string& getId() const;
132
136 const EventType getType() const;
137
141 const EventStatus getStatus() const;
142
146 void* getPayload() const;
147
153 void setId(const std::string& id);
154
160 void setType(const EventType type);
161
167 void setStatus(const EventStatus status);
168
174 void setPayload(void* payload);
175
182 bool isNull() const;
183
184 private:
185 std::string mId;
186 EventType mType;
187 EventStatus mStatus;
188 void* mPayload;
189};
190
191} // namespace scxml4cpp
192
193#endif // SCXML4CPP_EVENT_H
Definition Event.h:66
bool isNull() const
Definition Event.cpp:136
void setPayload(void *payload)
Definition Event.cpp:130
EventType
Definition Event.h:72
@ CHANGE_EVENT
Definition Event.h:74
@ CALL_EVENT
Definition Event.h:73
@ TIME_EVENT
Definition Event.h:76
@ SIGNAL_EVENT
Definition Event.h:75
@ ERROR_EVENT
Definition Event.h:77
const std::string & getId() const
Definition Event.cpp:88
virtual ~Event()
Definition Event.cpp:83
const EventType getType() const
Definition Event.cpp:94
EventStatus
Definition Event.h:83
@ TOBEPROCESSED
Definition Event.h:84
@ DEFERRED
Definition Event.h:88
@ IGNORED
Definition Event.h:86
@ PROCESSED
Definition Event.h:85
@ REJECTED
Definition Event.h:87
void setId(const std::string &id)
Definition Event.cpp:112
void setType(const EventType type)
Definition Event.cpp:118
Event()
Definition Event.cpp:37
Event & operator=(const Event &e)
Definition Event.cpp:70
void setStatus(const EventStatus status)
Definition Event.cpp:124
const EventStatus getStatus() const
Definition Event.cpp:100
void * getPayload() const
Definition Event.cpp:106
Definition Action.cpp:36