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)
void Print(const std::string& handler);
///create a DB from a given descriptor file and for a specific location
- SQLiteTreeHandler *createDB(std::string &i_locDesc, std::string &i_locDB);
+ SQLiteTreeHandler *createDB(std::string &i_name, std::string &i_locDesc, std::string &i_locDB);
// add an existent DB
void addDB(std::string &i_nameDB, std::string &i_locationDB);
FD->GetPaths(files);
for(int i = 0; i< files.size(); i++)
{
- // gimmick->addDB("remote_" + i.c_str(),files[i]);
- // AddTreeHandler(gimmick->getTreeHandlerMap("remote_" + i.c_str()));
+ std::string snb = "remote_1";
+ mGimmick->addDB(snb, crea::wx2std(files[i]));
+ // UpdateTreeViewLevel("remote_1",1);
}
}