X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeHandlerImageAdder.h;h=41ff0a63969818dc6bf209e925176b37767d1167;hb=6685b940296e57d4e3803765b986a6fe18d9be41;hp=c3024ddea6688426a5f3b0027fb25a4b5acae833;hpb=7ae1412df3d682f639683e751f46a3f07be16d0b;p=creaImageIO.git diff --git a/src2/creaImageIOTreeHandlerImageAdder.h b/src2/creaImageIOTreeHandlerImageAdder.h index c3024dd..41ff0a6 100644 --- a/src2/creaImageIOTreeHandlerImageAdder.h +++ b/src2/creaImageIOTreeHandlerImageAdder.h @@ -2,12 +2,10 @@ #define __creaImageIOTreeHandlerImageAdder_h_INCLUDED__ #include -#include #include #include -#include -#include -#include +//#include + // Signal/slot mechanism for progress events #include #include @@ -33,10 +31,11 @@ namespace creaImageIO ~TreeHandlerImageAdder(); /// Sets the TreeHandler void SetTreeHandler(TreeHandler* tree) { mTreeHandler = tree;} - /// Sets the TimestampDatabaseHandler - void SetTimestampHandler(TimestampDatabaseHandler* tdh) { mTimestampHandler = tdh;} + /// Sets the synchronizer void SetSynchronizer(Synchronizer* s){mSynchronizer=s;} + /// Sets the synchronizer + void SetCurrentDatabase(std::string cur){mCurrentDB=cur;} //==================================================================== //==================================================================== @@ -108,7 +107,7 @@ namespace creaImageIO void AddDirectory( const std::string& directory, bool recurse); /// Removes a file from the databases - void RemoveFile(const tree::Node*& node); + void RemoveFile(tree::Node* node); /// Removes files from the databases void RemoveFiles(const std::vector& nodes); /// Synchronizes the DB and disk by repeating the operations the user has done and returns a report @@ -121,13 +120,35 @@ namespace creaImageIO std::vector &i_ignorefiles, std::vector & attsModified, std::vector & newfiles); + ///Copies the files indicated in the vector and updates all databases + void CopyFiles(const std::vector& filenames, const std::string directory ); + + ///Saves as the files indicated in the vector in a specific directory + void SaveAs(const std::vector& filenames, std::vector i_images); ///Finds the node that matches the specified parameters void FindNode(tree::Node* parent, int level, const std::string& searchParam, const std::string& searchVal, tree::Node*& node); + + ///Finds the nodes that partially match the searchVal + void FindNodePartial(tree::Node* parent, int level, const std::string& searchParam, const std::string& searchVal, tree::Node*& node); + ///Checks the attributes of the database against the ones in disk void CheckAttributes(bool repair, std::string& file, std::vector& attsModified); + ///Deletes the drive with the given name (use for all databases except maintenance and timestamp) + void DeleteDriveFromMainDB(const std::string& drive); + ///Deletes the drive with the given name (use for maintenance and timestamp databases) + void DeleteDriveFromOtherDB(const std::string& drive); + ///Edits the given field and sets the new parameters + void EditField(tree::Node* node, const std::string& name, const std::string& key, const std::string& val); + ///Returns the demanded attributes for the given file + void GetAttributes(const std::vector& params, + const std::string& filename, + std::vector& results); + + + //==================================================================== @@ -144,9 +165,10 @@ namespace creaImageIO const std::string &addKey); TreeHandler* mTreeHandler; - TimestampDatabaseHandler* mTimestampHandler; Synchronizer* mSynchronizer; ImageReader mReader; + //ImageWriter mWriter; + std::string mCurrentDB; Progress mProgress; ProgressSignalType mProgressSignal;