comparison Plugins/Engine/PluginsEnumerations.cpp @ 3054:3638de45a08c db-changes

backward compatibility with filtering identifiers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Dec 2018 12:45:24 +0100
parents 37583cd183ed
children ce272138f15e
comparison
equal deleted inserted replaced
3053:3f986ce336c8 3054:3638de45a08c
264 throw OrthancException(ErrorCode_ParameterOutOfRange); 264 throw OrthancException(ErrorCode_ParameterOutOfRange);
265 } 265 }
266 } 266 }
267 267
268 268
269 OrthancPluginIdentifierConstraint Convert(IdentifierConstraintType constraint) 269 OrthancPluginIdentifierConstraint Convert(Compatibility::IdentifierConstraintType constraint)
270 { 270 {
271 switch (constraint) 271 switch (constraint)
272 { 272 {
273 case IdentifierConstraintType_Equal: 273 case Compatibility::IdentifierConstraintType_Equal:
274 return OrthancPluginIdentifierConstraint_Equal; 274 return OrthancPluginIdentifierConstraint_Equal;
275 275
276 case IdentifierConstraintType_GreaterOrEqual: 276 case Compatibility::IdentifierConstraintType_GreaterOrEqual:
277 return OrthancPluginIdentifierConstraint_GreaterOrEqual; 277 return OrthancPluginIdentifierConstraint_GreaterOrEqual;
278 278
279 case IdentifierConstraintType_SmallerOrEqual: 279 case Compatibility::IdentifierConstraintType_SmallerOrEqual:
280 return OrthancPluginIdentifierConstraint_SmallerOrEqual; 280 return OrthancPluginIdentifierConstraint_SmallerOrEqual;
281 281
282 case IdentifierConstraintType_Wildcard: 282 case Compatibility::IdentifierConstraintType_Wildcard:
283 return OrthancPluginIdentifierConstraint_Wildcard; 283 return OrthancPluginIdentifierConstraint_Wildcard;
284 284
285 default: 285 default:
286 throw OrthancException(ErrorCode_ParameterOutOfRange); 286 throw OrthancException(ErrorCode_ParameterOutOfRange);
287 } 287 }
288 } 288 }
289 289
290 290
291 IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint) 291 Compatibility::IdentifierConstraintType Convert(OrthancPluginIdentifierConstraint constraint)
292 { 292 {
293 switch (constraint) 293 switch (constraint)
294 { 294 {
295 case OrthancPluginIdentifierConstraint_Equal: 295 case OrthancPluginIdentifierConstraint_Equal:
296 return IdentifierConstraintType_Equal; 296 return Compatibility::IdentifierConstraintType_Equal;
297 297
298 case OrthancPluginIdentifierConstraint_GreaterOrEqual: 298 case OrthancPluginIdentifierConstraint_GreaterOrEqual:
299 return IdentifierConstraintType_GreaterOrEqual; 299 return Compatibility::IdentifierConstraintType_GreaterOrEqual;
300 300
301 case OrthancPluginIdentifierConstraint_SmallerOrEqual: 301 case OrthancPluginIdentifierConstraint_SmallerOrEqual:
302 return IdentifierConstraintType_SmallerOrEqual; 302 return Compatibility::IdentifierConstraintType_SmallerOrEqual;
303 303
304 case OrthancPluginIdentifierConstraint_Wildcard: 304 case OrthancPluginIdentifierConstraint_Wildcard:
305 return IdentifierConstraintType_Wildcard; 305 return Compatibility::IdentifierConstraintType_Wildcard;
306 306
307 default: 307 default:
308 throw OrthancException(ErrorCode_ParameterOutOfRange); 308 throw OrthancException(ErrorCode_ParameterOutOfRange);
309 } 309 }
310 } 310 }