summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/logger/Logger.hpp2
-rwxr-xr-xinclude/util/Singleton.hpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/logger/Logger.hpp b/include/logger/Logger.hpp
index 451ca45..d7603ab 100755
--- a/include/logger/Logger.hpp
+++ b/include/logger/Logger.hpp
@@ -50,6 +50,8 @@ class Logger : public Singleton< Logger >
scopedPtr< LoggerImpl > m_impl;
};
+DEFINE_SINGLETON( Logger )
+
class LogStream : private noncopyable, public std::ostringstream
{
public:
diff --git a/include/util/Singleton.hpp b/include/util/Singleton.hpp
index 80ab5e8..de43dbe 100755
--- a/include/util/Singleton.hpp
+++ b/include/util/Singleton.hpp
@@ -12,12 +12,15 @@
#define DECLARE_SINGLETON( T ) \
friend class Singleton< T >; \
friend class scopedPtr< T >;
+
+#define DEFINE_SINGLETON( T ) \
+ template class Singleton< T >;
template< class T >
class Singleton : private noncopyable
{
public:
- UTIL_DLL_VISIBLE static T& instance( )
+ static UTIL_DLL_VISIBLE T& instance( )
{
if( destroyed ) {
onDeadReference( );