From Giona
#ifndef OODATABASE_H_
#define OODATABASE_H_
#include "gionaTypes.h"
#include "Debug.h"
#include "SqliteDb.h"
#include "SqliteDBResultSet.h"
#include "GenericObject.h"
#include "GenericAttribute.h"
class OODataBase
{
public:
static const int NO_ERROR = 0;
static const int ERROR_SQLITEDB = 1;
static const int ERROR_NULL_PARAMETER = 2;
static const int ERROR_OBJECT_EXISTS_YET = 3;
static const int ERROR_EMPTY_STRING = 4;
static const int ERROR_OBJECT_NOT_FOUND = 5;
OODataBase();
virtual ~OODataBase();
bool setDatabaseName(STRING databaseName);
STRING getDatabaseName();
int getLastError();
bool connect();
bool disconnect();
bool storeNewObject(GenericObject* object);
bool updateObject(GenericObject* object);
bool deleteObject(STRING name);
GenericObject* getObjectByName(STRING name);
STRING* getObjectNameList();
private:
SqliteDb* db;
int lastError;
bool init();
};
#endif /*OODATABASE_H_*/
BACK