Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Module/Module.h

Go to the documentation of this file.
00001 /** 
00002 * @file Module.h
00003 *
00004 * Definition of class Module.
00005 *
00006 * @author <a href="mailto:juengel@informatik.hu-berlin.de">Matthias Jüngel</a>
00007 * @author <a href="mailto:martin@martin-loetzsch.de">Martin Lötzsch</a>
00008 */
00009 
00010 #ifndef __Module_h_
00011 #define __Module_h_
00012 
00013 #include "Tools/MessageQueue/InMessage.h"
00014 
00015 /**
00016 * @class Module
00017 *
00018 * Base class for all modules.
00019 *
00020 * @author <a href="mailto:juengel@informatik.hu-berlin.de">Matthias Jüngel</a>
00021 * @author <a href="mailto:martin@martin-loetzsch.de">Martin Lötzsch</a>
00022 */
00023 class Module : public MessageHandler
00024 {
00025 public:
00026   /** executes the module */
00027   virtual void execute() = 0;
00028 
00029   /** 
00030   * Called from a MessageQueue to distribute messages.
00031   * Use message.getMessageID to decide if the message is relavant for 
00032   * the MesssageHandler derivate.
00033   * Use message.bin, message.text or message.config as In streams to get the data from.
00034   * @param message The message that can be read.
00035   * @return true if the message was read (handled).
00036   */
00037   virtual bool handleMessage(InMessage& message) {return false;}
00038 
00039   virtual ~Module() {};
00040 };
00041 
00042 #endif //__Module_h_
00043 
00044 /*
00045 * Change Log:
00046 * $Log: Module.h,v $
00047 * Revision 1.1.1.1  2004/05/22 17:37:19  cvsadm
00048 * created new repository GT2004_WM
00049 *
00050 * Revision 1.1  2003/10/07 10:13:24  cvsadm
00051 * Created GT2004 (M.J.)
00052 *
00053 * Revision 1.1.1.1  2003/07/02 09:40:28  cvsadm
00054 * created new repository for the competitions in Padova from the 
00055 * tamara CVS (Tuesday 2:00 pm)
00056 *
00057 * removed unused solutions
00058 *
00059 * Revision 1.5  2002/09/19 14:26:52  juengel
00060 * Destructor added.
00061 *
00062 */

Generated on Thu Sep 23 19:57:39 2004 for GT2004 by doxygen 1.3.6