LosaDev source snapshot 2019

This commit is contained in:
LosaDev committed 2026-11-07 13:30:45 +07:00
commit c198676e97
20588 files changed
+8812878

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#pragma once
#include <boost/shared_ptr.hpp>
template< typename T >
class ioSingleton
{
private:
~ioSingleton() { };
ioSingleton() { };
ioSingleton( const T& other ) { };
T& operator=( const T& other ) { };
public:
inline static T* instance();
static boost::shared_ptr< T > pInstance;
};
template< typename T >
boost::shared_ptr< T > ioSingleton< T >::pInstance;
template< typename T >
T* ioSingleton< T >::instance()
{
if( 0 == pInstance )
pInstance.reset( new T );
return pInstance.get();
}