Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

KEYMAPPER: Move DefaultEventMapper implementation to its own cpp file

  • Loading branch information...
commit 3c918bb378b2204e38cfc16e10a3c2c0e130d9f4 1 parent a0ba4eb
Tarek Soliman tsoliman authored
Showing with 37 additions and 6 deletions.
  1. +35 −0 common/EventMapper.cpp
  2. +1 −6 common/events.h
  3. +1 −0  common/module.mk
35 common/EventMapper.cpp
View
@@ -0,0 +1,35 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "common/events.h"
+
+namespace Common {
+
+List<Event> DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) {
+ List<Event> events;
+ // just pass it through
+ events.push_back(ev);
+ return events;
+}
+
+
+} // namespace Common
7 common/events.h
View
@@ -226,12 +226,7 @@ class EventMapper {
class DefaultEventMapper : public EventMapper {
public:
// EventMapper interface
- virtual List<Event> mapEvent(const Event &ev, EventSource *source) {
- List<Event> events;
- // just pass it through
- events.push_back(ev);
- return events;
- }
+ virtual List<Event> mapEvent(const Event &ev, EventSource *source);
};
/**
1  common/module.mk
View
@@ -8,6 +8,7 @@ MODULE_OBJS := \
debug.o \
error.o \
EventDispatcher.o \
+ EventMapper.o \
EventRecorder.o \
file.o \
fs.o \
Please sign in to comment.
Something went wrong with that request. Please try again.