flatten 20260225

This commit is contained in:
Timothy Prepscius
2026-02-25 12:39:24 -05:00
commit fa54be052a
315 changed files with 49791 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// TJP COPYRIGHT HEADER
/**
* legal header
*
* ============================================================================
* TJP 10/11/01 Got rid of the constructed singleton, it was essentially
* a pointer!
*
* @author Timothy Prepscius
* @created 3/../01
*/
#include "Singleton.hpp"
namespace timprepscius {
namespace core {
Singletons::Singletons_ &Singletons::singletons()
{
static Singletons_ *v = new Singletons_();
return *v;
}
void Singletons::clearAll ()
{
for (auto *singleton : singletons())
singleton->clear();
}
Singleton_::Singleton_ ()
{
Singletons::singletons().insert(this);
}
Singleton_::~Singleton_ ()
{
Singletons::singletons().erase(this);
}
} // namespace
} // namespace