diff options
| author | Adam <Adam@anope.org> | 2010-08-22 00:34:02 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-08-22 00:34:02 -0400 |
| commit | ada65a3bafd3ae6738a80972cf0d2f31ad19a7ae (patch) | |
| tree | afde8d7594adc78beec8feb8090f4a990bd6a56b /include/services.h | |
| parent | 8a4c6ae618f767d2a9335da40f507ddccfc77b4b (diff) | |
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.
Diffstat (limited to 'include/services.h')
| -rw-r--r-- | include/services.h | 15 |
1 files changed, 15 insertions, 0 deletions
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<dynamic_reference_base *> 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 |
