Commit b4f570b3 authored by Steven Murray's avatar Steven Murray
Browse files

Deleted deadwood from DummyCatalogue and QtCoreAppSingleton

parent a4747dd4
......@@ -17,27 +17,8 @@
*/
#include "catalogue/DummyCatalogue.hpp"
#include "common/exception/Exception.hpp"
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
cta::catalogue::DummyCatalogue::DummyCatalogue():
m_db(":memory:"),
m_nextArchiveFileId(0) {
char *zErrMsg = 0;
if(SQLITE_OK != sqlite3_exec(m_db.getHandle(), "PRAGMA foreign_keys = ON;",
0, 0, &zErrMsg)) {
exception::Exception ex;
ex.getMessage() << "Failed to turn on foreign key support in SQLite: " <<
zErrMsg;
sqlite3_free(zErrMsg);
throw(ex);
}
}
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
......@@ -422,7 +403,7 @@ void cta::catalogue::DummyCatalogue::setDriveStatus(const cta::common::dataStruc
// getNextArchiveFileId
//------------------------------------------------------------------------------
uint64_t cta::catalogue::DummyCatalogue::getNextArchiveFileId() {
return m_nextArchiveFileId++;
return 0;
}
//------------------------------------------------------------------------------
......
......@@ -19,16 +19,6 @@
#pragma once
#include "catalogue/Catalogue.hpp"
#include "catalogue/SQLiteDatabase.hpp"
// The header file for atomic was is actually called cstdatomic in gcc 4.4
#if __GNUC__ == 4 && (__GNUC_MINOR__ == 4)
#include <cstdatomic>
#else
#include <atomic>
#endif
#include <string>
namespace cta {
namespace catalogue {
......@@ -39,11 +29,6 @@ namespace catalogue {
class DummyCatalogue: public Catalogue {
public:
/**
* Constructor.
*/
DummyCatalogue();
/**
* Destructor.
*/
......@@ -158,18 +143,6 @@ public:
const cta::common::dataStructures::ArchiveRequest &archiveRequest,
const cta::common::dataStructures::TapeFileLocation tapeFileLocation);
private:
/**
* SQLite database handle.
*/
SQLiteDatabase m_db;
/**
* The next identifier to be used for a new archive file.
*/
std::atomic<uint64_t> m_nextArchiveFileId;
}; // class DummyCatalogue
} // namespace catalogue
......
......@@ -19,8 +19,6 @@
#include "common/exception/Exception.hpp"
#include "common/QtCoreAppSingleton.hpp"
#include <iostream>
#include <string.h>
#include <strings.h>
......@@ -45,7 +43,6 @@ cta::common::QtCoreAppSingleton::QtCoreAppSingleton() {
// destructor
//------------------------------------------------------------------------------
cta::common::QtCoreAppSingleton::~QtCoreAppSingleton() {
std::cout << "Deleting Qt core application object" << std::endl;
delete m_app;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment