1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 #ifndef __CULLLIST_H__
15 #define __CULLLIST_H__
18 * The CullList class is used to delete objects at the end of the main loop to
19 * avoid problems with references to deleted pointers if an object were deleted
22 class CoreExport CullList
24 std::vector<classbase*> list;
25 std::vector<LocalUser*> SQlist;
28 /** Adds an item to the cull list
30 void AddItem(classbase* item) { list.push_back(item); }
31 void AddSQItem(LocalUser* item) { SQlist.push_back(item); }
33 /** Applies the cull list (deletes the contents)
38 class CoreExport ActionList
40 std::vector<HandlerBase0<void>*> list;
43 /** Adds an item to the list
45 void AddAction(HandlerBase0<void>* item) { list.push_back(item); }