comparison OrthancServer/Plugins/Engine/PluginsEnumerations.cpp @ 5769:0da33161acf7 find-refactoring

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 09 Sep 2024 16:37:52 +0200
parents 3765085693e5
children 8a8756b2dd0b
comparison
equal deleted inserted replaced
5768:23b5a090a64b 5769:0da33161acf7
596 596
597 default: 597 default:
598 throw OrthancException(ErrorCode_ParameterOutOfRange); 598 throw OrthancException(ErrorCode_ParameterOutOfRange);
599 } 599 }
600 } 600 }
601
602
603 OrthancPluginResourceType Convert(ResourceType type)
604 {
605 switch (type)
606 {
607 case ResourceType_Patient:
608 return OrthancPluginResourceType_Patient;
609
610 case ResourceType_Study:
611 return OrthancPluginResourceType_Study;
612
613 case ResourceType_Series:
614 return OrthancPluginResourceType_Series;
615
616 case ResourceType_Instance:
617 return OrthancPluginResourceType_Instance;
618
619 default:
620 throw OrthancException(ErrorCode_ParameterOutOfRange);
621 }
622 }
623
624
625 ResourceType Convert(OrthancPluginResourceType type)
626 {
627 switch (type)
628 {
629 case OrthancPluginResourceType_Patient:
630 return ResourceType_Patient;
631
632 case OrthancPluginResourceType_Study:
633 return ResourceType_Study;
634
635 case OrthancPluginResourceType_Series:
636 return ResourceType_Series;
637
638 case OrthancPluginResourceType_Instance:
639 return ResourceType_Instance;
640
641 default:
642 throw OrthancException(ErrorCode_ParameterOutOfRange);
643 }
644 }
645
646
647 OrthancPluginConstraintType Convert(ConstraintType constraint)
648 {
649 switch (constraint)
650 {
651 case ConstraintType_Equal:
652 return OrthancPluginConstraintType_Equal;
653
654 case ConstraintType_GreaterOrEqual:
655 return OrthancPluginConstraintType_GreaterOrEqual;
656
657 case ConstraintType_SmallerOrEqual:
658 return OrthancPluginConstraintType_SmallerOrEqual;
659
660 case ConstraintType_Wildcard:
661 return OrthancPluginConstraintType_Wildcard;
662
663 case ConstraintType_List:
664 return OrthancPluginConstraintType_List;
665
666 default:
667 throw OrthancException(ErrorCode_ParameterOutOfRange);
668 }
669 }
601 } 670 }
602 } 671 }