//========================================================================
+ void Gimmick::GetAttributes(const std::string& d,
+ const std::string& filename,
+ const std::vector<std::string>& params,
+ std::vector<std::string>& results)
+ {
+ TreeHandler * handler=GetTreeHandler(d);
+ mImageAdder.SetCurrentDatabase(d);
+ mImageAdder.SetTreeHandler(handler);
+ mImageAdder.SetTimestampHandler(mTimestampDatabase);
+ mImageAdder.SetSynchronizer(mSynchronizer);
+ mImageAdder.GetAttributes(params, filename, results);
+ }
+ //========================================================================
+
+ //========================================================================
+
void Gimmick::UpdateSetting(const std::string& name, const std::string& value)
{
mSettings->updateSetting(name,value);
///Edits the field described by the name and key provided with the value given
void EditField(tree::Node* node, const std::string& d, const std::string& name, const std::string& key, const std::string& val);
+ /// Returns the attributes in results described in params
+ void GetAttributes(const std::string& d,
+ const std::string& filename,
+ const std::vector<std::string>& params,
+ std::vector<std::string>& results);
+
///
const std::string& GetHomeDirectory();
const std::string& GetUserSettingsDirectory();
mTreeHandler->SetAttribute(node,key,val);
}
+ //=======================================================================
+ void TreeHandlerImageAdder::GetAttributes(const std::vector<std::string>& params,
+ const std::string& filename,
+ std::vector<std::string>& results)
+ {
+ std::vector<std::string>::const_iterator i;
+ std::string result;
+ for(i=params.begin();i!=params.end();i++)
+ {
+ mTreeHandler->GetAttribute("Image","FullFileName",filename,*i,result);
+ results.push_back(result);
+ }
+ }
+
}
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<std::string>& params,
+ const std::string& filename,
+ std::vector<std::string>& results);
+