00001 // /////////////////////////////////////////////////////////////////////////// 00002 // xrb_engine2_events.cpp by Victor Dods, created 2005/11/05 00003 // /////////////////////////////////////////////////////////////////////////// 00004 // Unless a different license was explicitly granted in writing by the 00005 // copyright holder (Victor Dods), this software is freely distributable under 00006 // the terms of the GNU General Public License, version 2. Any works deriving 00007 // from this work must also be released under the GNU GPL. See the included 00008 // file LICENSE for details. 00009 // /////////////////////////////////////////////////////////////////////////// 00010 00011 #include "xrb_engine2_events.hpp" 00012 00013 namespace Xrb 00014 { 00015 00016 bool Engine2::MatchEntity ( 00017 Event const *const event, 00018 Entity *const entity_to_match) 00019 { 00020 ASSERT1(event != NULL); 00021 ASSERT1(entity_to_match != NULL); 00022 00023 return dynamic_cast<EventEntity const *>(event) != NULL && 00024 static_cast<EventEntity const *>(event)->GetEntity() == entity_to_match; 00025 } 00026 00027 } // end of namespace Xrb