mail_stop.h

Go to the documentation of this file.
00001 #ifndef MAIL_STOP_CLASS
00002 #define MAIL_STOP_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : mail_stop                                                         *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1998-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "post_office_dll.h"
00019 
00020 #include <mechanisms/safe_callback.h>
00021 
00022 // forward:
00023 class letter;
00024 class unique_int;
00025 
00027 
00032 class POST_OFFICE_CLASS_STYLE mail_stop : public safe_callback
00033 {
00034 public:
00035 
00036   // it is required that the derived mail_stop invoke the end_availability()
00037   // method in its destructor before it destroys any other objects.
00038 
00039   class items_to_deliver : public callback_data_block {
00040   public:
00041     items_to_deliver(const unique_int &id, letter *package)
00042         : _id(id), _package(package) {}
00043     const unique_int &_id;
00044     letter *_package;
00045   };
00046 
00047 protected:
00049 
00051   virtual void real_callback(callback_data_block &data);
00052 
00053   virtual void delivery_for_you(const unique_int &id, letter *package) = 0;
00055 
00061 };
00062 
00063 #endif
00064 

Generated on Fri Nov 28 04:29:30 2008 for HOOPLE Libraries by  doxygen 1.5.1