ISIS Core Library 0.7.2 (api 3.0.0)

/scr/tee1/isis/lib/Core/CoreUtils/singletons.cpp

Go to the documentation of this file.
00001 #include "singletons.hpp"
00002 #include <boost/foreach.hpp>
00003 
00004 namespace isis
00005 {
00006 namespace util
00007 {
00008 
00009 Singletons &Singletons::getMaster()
00010 {
00011     static Singletons me;
00012     return me;
00013 }
00014 Singletons::~Singletons()
00015 {
00016     while ( !map.empty() ) {
00017         map.begin()->second();
00018         map.erase( map.begin() );
00019     }
00020 }
00021 Singletons::Singletons() {}
00022 
00023 }
00024 }