std::string dbpath = GetLocalDatabasePath();
// Create or open local database
- mLocalDatabase = createDB( mCurrentDirectory + "\\.gimmick\\localdatabase_Descriptor.txt", dbpath);
+ mLocalDatabase = createDB(i_nameDB, mCurrentDirectory + "\\.gimmick\\localdatabase_Descriptor.txt", dbpath);
// Add it to the TreeHandlerMap
mTreeHandlerMap[i_nameDB] = mLocalDatabase;
///////////////////////////////////////////////////////////////////////////
// create a DB from a attributes descriptor file for medical images //
+ // @param i_name : DB name //
// @param i_locDesc : location of descriptor file //
// @param i_locDB : location of DB //
// return : the SQLiteTreeHandler object on DB //
/////////////////////////////////////////////////////////////////////////
- SQLiteTreeHandler *Gimmick::createDB(std::string &i_locDesc, std::string &i_locDB)
+ SQLiteTreeHandler *Gimmick::createDB(std::string &i_name, std::string &i_locDesc, std::string &i_locDB)
{
SQLiteTreeHandler *sqlTreeH = new SQLiteTreeHandler(i_locDB);
// Create or open local database
{
GimmickError("ERROR CREATING '"<<i_locDB<<"'");
}
- sqlTreeH->SetAttribute(0,"Name","i_name");
+ sqlTreeH->SetAttribute(0,"Name",i_name);
}
else
{
//==============================================================
void Gimmick::Finalize()
{
+
// delete SQLiteTreeHandler Object
for( TreeHandlerMapType::const_iterator it = mTreeHandlerMap.begin();
it!= mTreeHandlerMap.end(); ++it)