comparison OrthancServer/ServerIndex.cpp @ 1718:2b812969e136 db-changes

getting rid of an IDatabaseWrapper::LookupIdentifier flavor
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Oct 2015 10:11:22 +0200
parents 3926e6317a43
children 88b74d8512be
comparison
equal deleted inserted replaced
1717:3926e6317a43 1718:2b812969e136
1928 result.push_back(db_.GetPublicId(*it)); 1928 result.push_back(db_.GetPublicId(*it));
1929 } 1929 }
1930 } 1930 }
1931 1931
1932 1932
1933 void ServerIndex::LookupIdentifier(std::list< std::pair<ResourceType, std::string> >& result, 1933 void ServerIndex::LookupIdentifier(LookupResults& result,
1934 const DicomTag& tag,
1934 const std::string& value) 1935 const std::string& value)
1935 { 1936 {
1936 result.clear(); 1937 result.clear();
1937 1938
1938 boost::mutex::scoped_lock lock(mutex_); 1939 boost::mutex::scoped_lock lock(mutex_);
1939 1940
1940 std::list<int64_t> id; 1941 std::list<int64_t> id;
1941 db_.LookupIdentifier(id, value); 1942 db_.LookupIdentifier(id, tag, value);
1942 1943
1943 for (std::list<int64_t>::const_iterator 1944 for (std::list<int64_t>::const_iterator
1944 it = id.begin(); it != id.end(); ++it) 1945 it = id.begin(); it != id.end(); ++it)
1945 { 1946 {
1946 result.push_back(std::make_pair(db_.GetResourceType(*it), 1947 result.push_back(std::make_pair(db_.GetResourceType(*it),