Palmer, 2E0EOL committed 34ccec7

Create DBMock which is derived from DB

Comments (0)

Files changed (3)

+  This is the base class, which does the real work for the database,
+  at present, is is just a back-end which does nothing, except provide
+  a basis to demonstrate the rest of the library.
+#include "DBMock.hpp"
+bool DB::is_mock()
+	// All classes deriving from this class are false databases.
+	return true;
+  This class represents the mocked variant of the database class.
+  It inherits from the main DB class, but then sets up a database
+  which is SQlite, and will be created in a temporary directory.
+#include "DB.hpp"
+class DBMock : public DB
+	bool is_mock(void);
 DB.o : DB.cpp DB.hpp
 	g++ -c -o DB.o DB.cpp
-concept.o : concept.cpp DB.hpp
+DBMock.o : DBMock.cpp DBMock.hpp
+	g++ -c -o DBMock.o DBMock.cpp
+concept.o : concept.cpp DB.hpp DBMock.o
 	g++ -c -o concept.o concept.cpp
 test : concept