+ //========================================================================
+ // get attributes values from database for a given file from database
+ //========================================================================
+ void Gimmick::GetAttributes(const std::string filename, std::map<std::string, std::string> &i_res, OutputAttr i_attr)
+ {
+ if (i_attr.inside.size() > 0)
+ {
+ std::map<std::string, std::string> map_attr;
+ TreeHandler * handler=GetTreeHandler(i_attr.db);
+ handler->getAllAttributes(filename, map_attr);
+ if(i_attr.inside.front() == "ALL") // we take all values
+ {
+ std::map<std::string, std::string>::iterator it = map_attr.begin();
+ for(; it != map_attr.end(); it++)
+ i_res[it->first] = it->second;
+ }
+ else
+ {
+ std::vector<std::string>::iterator it = i_attr.inside.begin();
+ for(; it != i_attr.inside.end(); it++)
+ i_res[(*it)] = map_attr[(*it)];
+ }
+ }
+
+
+ }
+
+