1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 12:56:37 +02:00

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.
This commit is contained in:
Adam
2010-08-22 00:34:02 -04:00
parent 8a4c6ae618
commit ada65a3baf
12 changed files with 144 additions and 215 deletions
+25
View File
@@ -0,0 +1,25 @@
#include "services.h"
#include "modules.h"
Base::Base()
{
}
Base::~Base()
{
for (std::set<dynamic_reference_base *>::iterator it = this->References.begin(), it_end = this->References.end(); it != it_end; ++it)
{
(*it)->Invalidate();
}
}
void Base::AddReference(dynamic_reference_base *r)
{
this->References.insert(r);
}
void Base::DelReference(dynamic_reference_base *r)
{
this->References.erase(r);
}