wefts_cleanup.h

Go to the documentation of this file.
00001 /* 00002 wefts_cleanup.h 00003 Cleanup interface. 00004 00005 $Id: wefts_cleanup.h,v 1.4 2004/03/28 08:28:10 jonnymind Exp $ 00006 --------------------------------------------- 00007 Begin : 2003-08-14 23:45 00008 Author : Giancarlo Niccolai 00009 00010 Last modified because: 00011 00012 */ 00013 00014 /************************************************************************** 00015 * This program is free software; you can redistribute it and/or modify * 00016 * it under the terms of the GNU Library General Public License as * 00017 * published by the Free Software Foundation; either version 2.1 of the * 00018 * License, or (at your option) any later version. * 00019 ***************************************************************************/ 00020 00021 #ifndef WT_CLEANUP_H 00022 #define WT_CLEANUP_H 00023 #include <list> 00024 00025 namespace Wefts { 00026 00033 class CleanupHandler 00034 { 00035 public: 00048 virtual void handleCleanup( int code, void *caller=0 )=0; 00049 }; 00050 00052 class CleanupItem 00053 { 00054 public: 00056 CleanupHandler *handler; 00058 int position; 00060 void *caller; 00061 00063 CleanupItem() {} 00064 00070 CleanupItem( CleanupHandler *h ) 00071 { 00072 handler = h; 00073 } 00074 00085 CleanupItem( CleanupHandler *h, int p ) 00086 { 00087 handler = h; 00088 position = p; 00089 } 00090 00097 CleanupItem( CleanupHandler *h, int p, void *c ) 00098 { 00099 handler = h; 00100 position = p; 00101 caller = c; 00102 } 00103 }; 00104 00106 typedef std::list< CleanupItem > CleanupList; 00107 00108 } 00109 00110 #endif 00111 /* end of wefts_cleanup.h */

Generated on Tue Oct 5 14:57:00 2004 for Wefts by doxygen 1.3.7