X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOGimmick.cpp;h=5ae843801e4952e9d89ca7e6d7b81497fe9a1959;hb=42f7c93a6f8fc2beeb8709be1b3616ec40f4699e;hp=8d1583ccac4ddd4fd75b62d39535e32e8cd05e8f;hpb=71365e2ce56b1ccf93054818d5d5cf64bcbaafb4;p=creaImageIO.git diff --git a/src2/creaImageIOGimmick.cpp b/src2/creaImageIOGimmick.cpp index 8d1583c..5ae8438 100644 --- a/src2/creaImageIOGimmick.cpp +++ b/src2/creaImageIOGimmick.cpp @@ -35,11 +35,11 @@ namespace creaImageIO // Sets the current directory to the home dir mCurrentDirectory = GetHomeDirectory(); mSynchronizer=0; + // Create local database handler mLocalDatabase = new SQLiteTreeHandler(GetLocalDatabasePath()); // Add it to the TreeHandlerMap mTreeHandlerMap["Local database"] = mLocalDatabase; - // Create or open local database if (! boost::filesystem::exists( GetLocalDatabasePath() ) ) { @@ -69,6 +69,37 @@ namespace creaImageIO } } + + + // Creates files and directories database + mTimestampDatabase = new TimestampDatabaseHandler(GetTimestampDatabasePath()); + // Create or open local database + if (! boost::filesystem::exists( GetTimestampDatabasePath() ) ) + { + std::string mess = "Timestamp database '"; + mess += GetTimestampDatabasePath(); + mess += "' does not exist : creating it"; + GimmickMessage(1,mess<Create() ) + { + GimmickError("ERROR CREATING '"<Open() ) + { + GimmickError("ERROR OPENING '"<second; } + //======================================================================== + ///Returns the timestamp database handler + TimestampDatabaseHandler* Gimmick::GetTimestampDatabase() const + { + return mTimestampDatabase; + } + //======================================================================== /// Add the files to the tree handler @@ -189,6 +244,7 @@ namespace creaImageIO GimmickMessage(2,"Adding files to '"<