From ada65a3bafd3ae6738a80972cf0d2f31ad19a7ae Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 22 Aug 2010 00:34:02 -0400 Subject: Added a classbase for the major classes, makes dynamic_reference invalidation really work. This also cleans up a bit of the code in the modestacker. --- include/services.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/services.h') diff --git a/include/services.h b/include/services.h index ca02d087e..2cda56a31 100644 --- a/include/services.h +++ b/include/services.h @@ -193,6 +193,21 @@ extern "C" void __pfnBkCheck() {} #include "anope.h" +class dynamic_reference_base; + +/** The base class that most classes in Anope inherit from + */ +class CoreExport Base +{ + /* References to this base class */ + std::set References; + public: + Base(); + virtual ~Base(); + void AddReference(dynamic_reference_base *r); + void DelReference(dynamic_reference_base *r); +}; + /** This class can be used on its own to represent an exception, or derived to represent a module-specific exception. * When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or * a class derived from ModuleException. If a module throws an exception during its constructor, the module will not -- cgit