summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-09-07 10:31:27 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-09-07 10:31:27 +0200
commitf6939dfbdd979dfbb749c64703d0cdc53dae106d (patch)
treee4e4560cca9d956d6af13fe44f3522b9cc811047 /include
parent1a59d81f570e8c88860b7e5e1b20ec57370a56c1 (diff)
downloadcrawler-f6939dfbdd979dfbb749c64703d0cdc53dae106d.tar.gz
crawler-f6939dfbdd979dfbb749c64703d0cdc53dae106d.tar.bz2
fixed miracle of unresolved instance function in Singleton (we
need a "usage" of the template somewhere in the DLL) fixed all module tests on Windows
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( );