view m-toolbox/classes/@ao/checkDataType.m @ 2:18e956c96a1b database-connection-manager

Add LTPDADatabaseConnectionManager implementation. Matlab code
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Sun, 04 Dec 2011 21:23:09 +0100
parents f0afece42f48
children
line wrap: on
line source

% CHECKDATATYPE Throws an error for AOs with a specified data-type.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: CHECKDATATYPE Throws an error for AOs with a specified data-type.
%
% CALL:        aos.checkDataType('tsdata', 'cdata');
%
% VERSION:     $Id: checkDataType.m,v 1.1 2011/04/15 15:02:18 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function checkDataType(aos, varargin)
  
  % Loop over the data-types
  for tt=1:nargin-1
    dType = varargin{tt};
    
    for aa = 1:numel(aos)
      if isa(aos(aa).data, dType)
        stack = dbstack();
        error('### The method %s/%s doesn''t work for %s type AO.', class(aos), stack(2).name, dType);
      end
    end
  end
  
end