view m-toolbox/classes/@ltpda_uoh/testCallerIsMethod.m @ 1:2014ba5b353a database-connection-manager

Remove old code
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Sat, 03 Dec 2011 18:13:55 +0100
parents f0afece42f48
children
line wrap: on
line source

% TESTCALLERISMETHOD hidden static method which tests the 'internal' command of a LTPDA-function.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: TESTCALLERISMETHOD hidden static method which tests the 'internal'
%              command of a LTPDA-function. This means for example that the
%              method doesn't add history to the object.
%
% CALL:        'normal' command
%                 out = ltpda_uoh.testCallerIsMethod(@fcn, arg1, arg2, ...);
%
%              modifier command
%                 ltpda_uoh.testCallerIsMethod(@fcn, arg1, arg2, ...);
%
% INPUTS:      fcn:  Function name you want to test
%              args: Input arguments for the function
%
% VERSION:     $Id: testCallerIsMethod.m,v 1.2 2011/04/19 10:40:16 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function out = testCallerIsMethod(varargin)
  
  fcn = varargin{1};
  args = varargin(2:end);
  
  if nargout >= 1
    out = fcn(args{:});
  else
    fcn(args{:});
    out = varargin{1};
  end
  
end