classdef WorkflowIntent
    %% WORKFLOWINTENT Enumeration of the user intent in FPT
    
    %   Copyright 2019 The MathWorks, Inc.
    
    enumeration
        Null % No intent
        Collection % Collection only
        IterativeConversion % Iterative conversion pre20a workflow
        OptimizedConversion % Optimized conversion using fxpopt
    end
    
    methods (Static)
        function enumValue = convertIntentToEnum(intent)
            enumValueFunctionHandle = @(x) fxptui.internal.WorkflowIntent(x);
            switch intent
                case "Collection"
                    enumValue = enumValueFunctionHandle("Collection");
                case "Conversion"
                    enumValue = enumValueFunctionHandle("IterativeConversion");
                case "Optimization"
                    enumValue = enumValueFunctionHandle("OptimizedConversion");
                otherwise
                    enumValue = enumValueFunctionHandle("Null");
            end
        end
    end
    
end
