From 836536c2478cac29f905464ab0f53b98af77c6b1 Mon Sep 17 00:00:00 2001 From: Aaron Marks Date: Fri, 17 Jun 2005 08:12:59 +0000 Subject: Updated Makefile.am. dataproviderfactory.cpp now conditionally includes related dataprovider header. (A problem exists with instantiating Being in dalstorage.cpp though) --- src/Makefile.am | 5 +++-- src/dal/dataproviderfactory.cpp | 7 +++++++ src/storage.cpp | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2b450252..7c4d59e8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -36,8 +36,6 @@ tmwserv_SOURCES = main.cpp \ dal/dataprovider.cpp \ dal/dataproviderfactory.h \ dal/dataproviderfactory.cpp \ - dal/mysqldataprovider.h \ - dal/mysqldataprovider.cpp \ dal/sqlitedataprovider.h \ dal/sqlitedataprovider.cpp \ dal/recordset.h \ @@ -46,6 +44,9 @@ tmwserv_SOURCES = main.cpp \ dalstorage.h \ dalstorage.cpp +# dal/mysqldataprovider.h +# dal/mysqldataprovider.cpp + if BUILD_SQLITE tmwserv_SOURCES += sqlite/SQLiteWrapper.cpp \ diff --git a/src/dal/dataproviderfactory.cpp b/src/dal/dataproviderfactory.cpp index 98eb6667..7cd44e29 100644 --- a/src/dal/dataproviderfactory.cpp +++ b/src/dal/dataproviderfactory.cpp @@ -23,8 +23,15 @@ #include "dataproviderfactory.h" +#ifdef MYSQL_SUPPORT #include "mysqldataprovider.h" +#else +#ifdef SQLITE_SUPPORT #include "sqlitedataprovider.h" +#else +#error "Database not specified" +#endif +#endif namespace tmwserv diff --git a/src/storage.cpp b/src/storage.cpp index 4fd9a7e0..bb2bd6aa 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -40,7 +40,7 @@ Storage *Storage::getInstance() { if (instance == NULL) { - instance = new DALStorage(); //SQLiteStorage(); + instance = new tmwserv::DALStorage(); //SQLiteStorage(); } return instance; -- cgit v1.2.3-70-g09d2