comparison Plugins/Engine/OrthancPluginDatabase.cpp @ 1728:4941494b5dd8 db-changes

rename LookupIdentifier as LookupIdentifierExact
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Oct 2015 15:03:52 +0200
parents 1ae29c5e52fb
children 54d78925cbb6
comparison
equal deleted inserted replaced
1727:1ae29c5e52fb 1728:4941494b5dd8
592 592
593 return ForwardSingleAnswer(target); 593 return ForwardSingleAnswer(target);
594 } 594 }
595 595
596 596
597 void OrthancPluginDatabase::LookupIdentifier(std::list<int64_t>& target, 597 void OrthancPluginDatabase::LookupIdentifierExact(std::list<int64_t>& target,
598 ResourceType level, 598 ResourceType level,
599 const DicomTag& tag, 599 const DicomTag& tag,
600 const std::string& value) 600 const std::string& value)
601 { 601 {
602 ResetAnswers(); 602 ResetAnswers();
603 603
604 OrthancPluginDicomTag tmp; 604 OrthancPluginDicomTag tmp;
605 tmp.group = tag.GetGroup(); 605 tmp.group = tag.GetGroup();
606 tmp.element = tag.GetElement(); 606 tmp.element = tag.GetElement();
607 tmp.value = value.c_str(); 607 tmp.value = value.c_str();
608 608
609 if (extensions_.lookupIdentifier3 != NULL) 609 if (extensions_.lookupIdentifierExact != NULL)
610 { 610 {
611 CheckSuccess(extensions_.lookupIdentifier3(GetContext(), payload_, Plugins::Convert(level), &tmp)); 611 CheckSuccess(extensions_.lookupIdentifierExact(GetContext(), payload_, Plugins::Convert(level), &tmp));
612 ForwardAnswers(target); 612 ForwardAnswers(target);
613 } 613 }
614 else 614 else
615 { 615 {
616 // Emulate "lookupIdentifier3" if unavailable 616 // Emulate "lookupIdentifierExact" if unavailable
617 617
618 if (backend_.lookupIdentifier == NULL) 618 if (backend_.lookupIdentifier == NULL)
619 { 619 {
620 LOG(ERROR) << "The plugin does not have the extension \"lookupIdentifierExact\"";
620 throw OrthancException(ErrorCode_DatabasePlugin); 621 throw OrthancException(ErrorCode_DatabasePlugin);
621 } 622 }
622 623
623 CheckSuccess(backend_.lookupIdentifier(GetContext(), payload_, &tmp)); 624 CheckSuccess(backend_.lookupIdentifier(GetContext(), payload_, &tmp));
624 625