From 3c918bb378b2204e38cfc16e10a3c2c0e130d9f4 Mon Sep 17 00:00:00 2001 From: Tarek Soliman Date: Sat, 18 Feb 2012 17:38:28 -0600 Subject: KEYMAPPER: Move DefaultEventMapper implementation to its own cpp file --- common/EventMapper.cpp | 35 +++++++++++++++++++++++++++++++++++ common/events.h | 7 +------ common/module.mk | 1 + 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 common/EventMapper.cpp diff --git a/common/EventMapper.cpp b/common/EventMapper.cpp new file mode 100644 index 0000000000..be55c6b9a5 --- /dev/null +++ b/common/EventMapper.cpp @@ -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 DefaultEventMapper::mapEvent(const Event &ev, EventSource *source) { + List events; + // just pass it through + events.push_back(ev); + return events; +} + + +} // namespace Common diff --git a/common/events.h b/common/events.h index fec4d37d34..5e539f072e 100644 --- a/common/events.h +++ b/common/events.h @@ -226,12 +226,7 @@ public: class DefaultEventMapper : public EventMapper { public: // EventMapper interface - virtual List mapEvent(const Event &ev, EventSource *source) { - List events; - // just pass it through - events.push_back(ev); - return events; - } + virtual List mapEvent(const Event &ev, EventSource *source); }; /** diff --git a/common/module.mk b/common/module.mk index 7434df7052..ae5e41cb8c 100644 --- a/common/module.mk +++ b/common/module.mk @@ -8,6 +8,7 @@ MODULE_OBJS := \ debug.o \ error.o \ EventDispatcher.o \ + EventMapper.o \ EventRecorder.o \ file.o \ fs.o \ -- cgit v1.2.3