2015-05-17 04:55:29 +00:00
|
|
|
#ifndef HECLDATABASE_CPP
|
|
|
|
#error This file must only be included from HECLDatabase.cpp
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "HECLDatabase.hpp"
|
|
|
|
#include "CSQLite.hpp"
|
|
|
|
|
|
|
|
namespace HECLDatabase
|
|
|
|
{
|
|
|
|
|
|
|
|
class CPackedDatabase final : public IDatabase
|
|
|
|
{
|
|
|
|
CSQLite m_sql;
|
|
|
|
public:
|
|
|
|
CPackedDatabase(const std::string& path)
|
2015-05-18 09:29:23 +00:00
|
|
|
: m_sql(path.c_str(), true)
|
2015-05-17 04:55:29 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
~CPackedDatabase()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Type getType() const
|
|
|
|
{
|
|
|
|
return PACKED;
|
|
|
|
}
|
|
|
|
|
|
|
|
Access getAccess() const
|
|
|
|
{
|
|
|
|
return READONLY;
|
|
|
|
}
|
|
|
|
|
2015-05-18 09:29:23 +00:00
|
|
|
const IDataObject* lookupObject(size_t id) const
|
2015-05-17 04:55:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
const IDataObject* lookupObject(const std::string& name) const
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-05-18 09:29:23 +00:00
|
|
|
const IDataObject* addDataBlob(const std::string& name, const void* data, size_t length)
|
2015-05-17 04:55:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-05-18 09:29:23 +00:00
|
|
|
const IDataObject* addDataBlob(const void* data, size_t length)
|
2015-05-17 04:55:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
bool writeDatabase(IDatabase::Type type, const std::string& path) const
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|