comparison OrthancServer/Search/DicomTagConstraint.cpp @ 3059:caa03eaeb097 db-changes

fix to use from orthanc-databases
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Dec 2018 17:25:12 +0100
parents 71ac4f28176f
children ce272138f15e
comparison
equal deleted inserted replaced
3058:6faf575ba9cc 3059:caa03eaeb097
32 32
33 33
34 #include "../PrecompiledHeadersServer.h" 34 #include "../PrecompiledHeadersServer.h"
35 #include "DicomTagConstraint.h" 35 #include "DicomTagConstraint.h"
36 36
37 #if defined(ORTHANC_ENABLE_LUA) && ORTHANC_ENABLE_LUA != 0
38 # include "../ServerToolbox.h"
39 #endif
40
37 #include "../../Core/OrthancException.h" 41 #include "../../Core/OrthancException.h"
38 #include "../../Core/Toolbox.h" 42 #include "../../Core/Toolbox.h"
39 #include "../ServerToolbox.h"
40 #include "DatabaseConstraint.h" 43 #include "DatabaseConstraint.h"
41 44
42 #include <boost/regex.hpp> 45 #include <boost/regex.hpp>
43 46
44 namespace Orthanc 47 namespace Orthanc
154 tag_(constraint.GetTag()), 157 tag_(constraint.GetTag()),
155 constraintType_(constraint.GetConstraintType()), 158 constraintType_(constraint.GetConstraintType()),
156 caseSensitive_(constraint.IsCaseSensitive()), 159 caseSensitive_(constraint.IsCaseSensitive()),
157 mandatory_(constraint.IsMandatory()) 160 mandatory_(constraint.IsMandatory())
158 { 161 {
162 #if defined(ORTHANC_ENABLE_LUA) && ORTHANC_ENABLE_LUA != 0
159 assert(constraint.IsIdentifier() == 163 assert(constraint.IsIdentifier() ==
160 ServerToolbox::IsIdentifier(constraint.GetTag(), constraint.GetLevel())); 164 ServerToolbox::IsIdentifier(constraint.GetTag(), constraint.GetLevel()));
165 #endif
161 166
162 if (constraint.IsIdentifier()) 167 if (constraint.IsIdentifier())
163 { 168 {
164 // This conversion is only available for main DICOM tags, not for identifers 169 // This conversion is only available for main DICOM tags, not for identifers
165 throw OrthancException(ErrorCode_BadSequenceOfCalls); 170 throw OrthancException(ErrorCode_BadSequenceOfCalls);