Mercurial > hg > orthanc
changeset 2696:1b736d151ea1 jobs
renames
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Jul 2018 15:07:41 +0200 |
parents | c4ee0bedb51b |
children | e583478e0c6c |
files | OrthancServer/Search/LookupIdentifierQuery.cpp OrthancServer/Search/LookupIdentifierQuery.h |
diffstat | 2 files changed, 20 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Search/LookupIdentifierQuery.cpp Tue Jul 03 14:59:54 2018 +0200 +++ b/OrthancServer/Search/LookupIdentifierQuery.cpp Tue Jul 03 15:07:41 2018 +0200 @@ -46,9 +46,9 @@ { LookupIdentifierQuery::Disjunction::~Disjunction() { - for (size_t i = 0; i < disjunction_.size(); i++) + for (size_t i = 0; i < constraints_.size(); i++) { - delete disjunction_[i]; + delete constraints_[i]; } } @@ -57,14 +57,14 @@ IdentifierConstraintType type, const std::string& value) { - disjunction_.push_back(new Constraint(tag, type, value)); + constraints_.push_back(new Constraint(tag, type, value)); } LookupIdentifierQuery::~LookupIdentifierQuery() { - for (Constraints::iterator it = constraints_.begin(); - it != constraints_.end(); ++it) + for (Disjuntions::iterator it = disjuntions_.begin(); + it != disjuntions_.end(); ++it) { delete *it; } @@ -76,15 +76,15 @@ const std::string& value) { assert(IsIdentifier(tag)); - constraints_.push_back(new Disjunction); - constraints_.back()->Add(tag, type, value); + disjuntions_.push_back(new Disjunction); + disjuntions_.back()->Add(tag, type, value); } LookupIdentifierQuery::Disjunction& LookupIdentifierQuery::AddDisjunction() { - constraints_.push_back(new Disjunction); - return *constraints_.back(); + disjuntions_.push_back(new Disjunction); + return *disjuntions_.back(); } @@ -105,9 +105,9 @@ { std::list<int64_t> a; - for (size_t j = 0; j < constraints_[i]->GetSize(); j++) + for (size_t j = 0; j < disjuntions_[i]->GetSize(); j++) { - const Constraint& constraint = constraints_[i]->GetConstraint(j); + const Constraint& constraint = disjuntions_[i]->GetConstraint(j); std::list<int64_t> b; database.LookupIdentifier(b, level_, constraint.GetTag(), constraint.GetType(), constraint.GetValue()); @@ -122,10 +122,10 @@ void LookupIdentifierQuery::Print(std::ostream& s) const { s << "Constraint: " << std::endl; - for (Constraints::const_iterator - it = constraints_.begin(); it != constraints_.end(); ++it) + for (Disjuntions::const_iterator + it = disjuntions_.begin(); it != disjuntions_.end(); ++it) { - if (it == constraints_.begin()) + if (it == disjuntions_.begin()) s << " "; else s << "OR ";
--- a/OrthancServer/Search/LookupIdentifierQuery.h Tue Jul 03 14:59:54 2018 +0200 +++ b/OrthancServer/Search/LookupIdentifierQuery.h Tue Jul 03 15:07:41 2018 +0200 @@ -103,7 +103,7 @@ class Disjunction : public boost::noncopyable { private: - std::vector<Constraint*> disjunction_; + std::vector<Constraint*> constraints_; public: ~Disjunction(); @@ -114,21 +114,21 @@ size_t GetSize() const { - return disjunction_.size(); + return constraints_.size(); } const Constraint& GetConstraint(size_t i) const { - return *disjunction_[i]; + return *constraints_[i]; } }; private: - typedef std::vector<Disjunction*> Constraints; + typedef std::vector<Disjunction*> Disjuntions; ResourceType level_; - Constraints constraints_; + Disjuntions disjuntions_; public: LookupIdentifierQuery(ResourceType level) : level_(level) @@ -155,7 +155,7 @@ size_t GetSize() const { - return constraints_.size(); + return disjuntions_.size(); } // The database must be locked