00001 /* 00002 * lib/message/handler.cc 00003 * 00004 * Message handling "system" for errors, warnings and verbose messages. 00005 * Message handler (default) implementation. 00006 * 00007 * Copyright (c) 2004 by Wolfgang Wieser ] wwieser (a) gmx <*> de [ 00008 * 00009 * This file may be distributed and/or modified under the terms of the 00010 * GNU General Public License version 2 as published by the Free Software 00011 * Foundation. (See COPYING.GPL for details.) 00012 * 00013 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00014 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00015 * 00016 */ 00017 00018 #include "handler.h" 00019 #include "manager.h" 00020 00021 00022 void MessageHandler::HandleMessage(const Message &m) 00023 { 00024 // Default implementation: Do nothing. 00025 } 00026 00027 00028 void MessageHandler::SelectMessageTypes(Message::Type mask) 00029 { 00030 // We cannot inline this at the handler.h file as the manager 00031 // include file cannot be included before (there are stronger 00032 // dependencies the other way round). Hence, not inline as it 00033 // is not speed critical anyways. 00034 MessageManager::SelectMessageTypes(this,mask); 00035 } 00036 00037 00038 MessageHandler::MessageHandler() 00039 { 00040 mtmask=Message::MTNone; 00041 00042 MessageManager::RegisterHandler(this); 00043 } 00044 00045 MessageHandler::~MessageHandler() 00046 { 00047 MessageManager::UnregisterHandler(this); 00048 }