Skip to content
Snippets Groups Projects
Commit ac32a7ad authored by Steven Murray's avatar Steven Murray
Browse files

Renamed SQLiteDatabase to SqliteDatabase

parent 5a0b4f88
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 2.6)
set (CATALOGUE_LIB_SRC_FILES
Catalogue.cpp
DummyCatalogue.cpp
SQLiteDatabase.cpp)
SqliteDatabase.cpp)
add_library (ctacatalogue
${CATALOGUE_LIB_SRC_FILES})
......
......@@ -16,18 +16,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "catalogue/SQLiteDatabase.hpp"
#include "catalogue/SqliteDatabase.hpp"
#include "common/exception/Exception.hpp"
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
cta::catalogue::SQLiteDatabase::SQLiteDatabase(const std::string &filename) {
cta::catalogue::SqliteDatabase::SqliteDatabase(const std::string &filename) {
m_dbHandle = NULL;
if(sqlite3_open(filename.c_str(), &m_dbHandle)) {
sqlite3_close(m_dbHandle);
exception::Exception ex;
ex.getMessage() << "Failed to construct SQLiteDatabase: sqlite3_open failed"
ex.getMessage() << "Failed to construct SqliteDatabase: sqlite3_open failed"
": " << sqlite3_errmsg(m_dbHandle);
throw(ex);
}
......@@ -36,13 +36,13 @@ cta::catalogue::SQLiteDatabase::SQLiteDatabase(const std::string &filename) {
//------------------------------------------------------------------------------
// destructor
//------------------------------------------------------------------------------
cta::catalogue::SQLiteDatabase::~SQLiteDatabase() {
cta::catalogue::SqliteDatabase::~SqliteDatabase() {
sqlite3_close(m_dbHandle);
}
//------------------------------------------------------------------------------
// getHandle
//------------------------------------------------------------------------------
sqlite3 *cta::catalogue::SQLiteDatabase::getHandle() {
sqlite3 *cta::catalogue::SqliteDatabase::getHandle() {
return m_dbHandle;
}
......@@ -27,7 +27,7 @@ namespace catalogue {
/**
* A C++ wrapper around an SQLite database handle.
*/
class SQLiteDatabase {
class SqliteDatabase {
public:
/**
......@@ -35,12 +35,12 @@ public:
*
* @param filename The filename to be passed to the sqlit3_open() function.
*/
SQLiteDatabase(const std::string &filename);
SqliteDatabase(const std::string &filename);
/**
* Destructor.
*/
~SQLiteDatabase();
~SqliteDatabase();
/**
* Returns the underlying database handle.
......@@ -52,7 +52,7 @@ public:
private:
/**
* SQLite database handle.
* The database handle.
*/
sqlite3 *m_dbHandle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment