diff options
Diffstat (limited to 'include/util/Singleton.hpp')
-rwxr-xr-x | include/util/Singleton.hpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/util/Singleton.hpp b/include/util/Singleton.hpp index 1bfb460..f291435 100755 --- a/include/util/Singleton.hpp +++ b/include/util/Singleton.hpp @@ -10,17 +10,23 @@ #include <stdexcept> #define DECLARE_SINGLETON( T ) \ - friend class scopedPtr< T >; \ - friend class Singleton< T >; + friend class Singleton< T >; \ + friend class scopedPtr< T >; + +#define DEFINE_SINGLETON( T ) + +#if 0 +#define DECLARE_SINGLETON( T ) \ #define DEFINE_SINGLETON( T ) \ - SINGLETON_EXTERN template class SINGLETON_EXPORT Singleton< T >; + DLL_EXTERN template class DLL_VISIBLE Singleton< T >; +#endif template< class T > class Singleton : private noncopyable { public: - static T& instance( ) + DLL_VISIBLE static T& instance( ) { if( destroyed ) { onDeadReference( ); |