ifw  0.0.1-dev
 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 EVENT_H
28 #define 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 
39  class Event
40  {
41  public:
42  enum EventType{
43  CALL_EVENT = 0,
48  };
49 
56  };
57 
58  Event();
59  Event(const std::string& id, const EventType type);
60  Event(const Event& e);
61  Event& operator=(const Event& e);
62  virtual ~Event();
63 
64  const std::string& getId() const;
65  const EventType getType() const;
66  const EventStatus getStatus() const;
67  void* getPayload() const;
68 
69  void setId(const std::string& id);
70  void setType(const EventType type);
71  void setStatus(const EventStatus status);
72  void setPayload(void* payload);
73 
74  bool isNull() const;
75 
76  private:
77  std::string mId;
78  EventType mType;
79  EventStatus mStatus;
80  void* mPayload;
81  };
82 
83 }
84 #endif
const EventStatus getStatus() const
Definition: Event.cpp:95
Definition: Event.h:46
virtual ~Event()
Definition: Event.cpp:78
bool isNull() const
Definition: Event.cpp:131
Definition: Event.h:43
Definition: Event.h:47
Event & operator=(const Event &e)
Definition: Event.cpp:65
Definition: Event.h:54
Definition: Event.h:55
Definition: Event.h:51
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:42
Definition: Event.h:44
Definition: Event.h:53
const std::string & getId() const
Definition: Event.cpp:83
void setType(const EventType type)
Definition: Event.cpp:113
Definition: Event.h:52
Event()
Definition: Event.cpp:32
Definition: Event.h:39
EventStatus
Definition: Event.h:50
const EventType getType() const
Definition: Event.cpp:89
void setStatus(const EventStatus status)
Definition: Event.cpp:119
Definition: Event.h:45