Code covered by the BSD License  

Highlights from
FinMetrics

  • fm(varargin) This source file is subject to version 3 of the GPL license,
  • AssetThis source file is subject to version 3 of the GPL license,
  • AssetUniverseThis source file is subject to version 3 of the GPL license,
  • AxlThis source file is subject to version 3 of the GPL license,
  • CashPositionThis source file is subject to version 3 of the GPL license,
  • CashTransactionThis source file is subject to version 3 of the GPL license,
  • Config This source file is subject to version 3 of the GPL license,
  • ConsoleMenuThis source file is subject to version 3 of the GPL license,
  • ConsoleMenuItemThis source file is subject to version 3 of the GPL license,
  • CurrencyAssetThis source file is subject to version 3 of the GPL license,
  • ExchangeTradedAssetThis source file is subject to version 3 of the GPL license,
  • FinMetricsThis source file is subject to version 3 of the GPL license,
  • PortfolioThis source file is subject to version 3 of the GPL license,
  • PositionThis source file is subject to version 3 of the GPL license,
  • StatisticsThis source file is subject to version 3 of the GPL license,
  • StockPositionThis source file is subject to version 3 of the GPL license,
  • StockTransactionThis source file is subject to version 3 of the GPL license,
  • TextUIThis source file is subject to version 3 of the GPL license,
  • TextUILocaleThis source file is subject to version 3 of the GPL license,
  • TextUIQuestionThis source file is subject to version 3 of the GPL license,
  • TextUIQuestionnaireThis source file is subject to version 3 of the GPL license,
  • TransactionThis source file is subject to version 3 of the GPL license,
  • View all files

FinMetrics

by

 

Open source/open architecture quantitative portfolio management environment.

TextUIQuestion
classdef TextUIQuestion < handle
% This source file is subject to version 3 of the GPL license, 
% that is bundled with this package in the file LICENSE, and is 
% available online at http://www.gnu.org/licenses/gpl.txt
%
% This source file can be linked to GPL-incompatible facilities, 
% produced or made available by MathWorks, Inc.
    
    properties (SetAccess = private, GetAccess = public)
        Question;
        Tag;
        Details;
        List = false;
        ListSelect = 'one';
        ListItems = {};
        EmptyAnswer = false;
        Cancelable = true;
        % If Cancelable is set to true the questionnaire may be cancelled
        % at that question
        ValidateCallback; 
        % ValidateCallback has to return eithe 0, 1, 2 or a questionTag
        % 0 - validation failed, ask question again
        % 1 - validation passed, move on to the next question
        % 2 - terminate the questionary (this will be honored even if Cancelable is
        % set to false
        % questionTag - jump to the question with the returned tag. If no
        % question found for a given tag, the questionnaire is considered
        % completed. 'Complete' is a convention keyword, used to stop the
        % questionnaire and go to a review.
        %
        % questionTag was included to provide a mechanism to create
        % non-linear questionnaires, with the ability to redirect the flow
        % depending on either the answer provided or some internal logic.
        AnswerOverrideCallback;
        % If defined, whatever is return by the call is saved as answer to
        % the question. ValidateCallback is execuded before
        % AnswerOverrideCallback.
    end
    
    properties (SetAccess = public, GetAccess = public)
        Data;
        DefaultAnswer;
        HelpMessage;
        DisplayInReview = true;
    end    
    
    methods
        function TUIQobj = TextUIQuestion(Question, Tag, Props)
            TUIQobj.Question = Question;
            TUIQobj.Tag = Tag;
            
                if (nargin == 3)                               
                    for t=1:size(Props,2) / 2,
                    TUIQobj.(Props{t*2-1}) = Props{t*2};                    
                    end
                end
        end
    end
    
end

Contact us