diff m-toolbox/classes/+utils/@helper/isobject.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m-toolbox/classes/+utils/@helper/isobject.m	Wed Nov 23 19:22:13 2011 +0100
@@ -0,0 +1,35 @@
+function varargout = isobject(varargin)
+% ISOBJECT checks that the input objects are one of the LTPDA object types.
+% 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DESCRIPTION: ISOBJECT checks that the input objects are one of the LTPDA object
+%              types.
+% 
+% CALL:        result  = ltpda_isobject(a1)
+%              classes = ltpda_isobject()
+% 
+% INPUTS:      objects
+% 
+% OUTPUTS:     result == 1 if all input objects are LTPDA objects
+%              result == 0 otherwise
+%              classes - a list of recognised LTPDA object types
+%
+% VERSION:     $Id: isobject.m,v 1.1 2008/06/18 13:35:12 hewitson Exp $
+%
+% HISTORY: 09-05-07 M Hewitson
+%             Creation
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+for j=1:nargin
+  if ~isa(varargin{j}, 'ltpda_obj')
+    varargout{1} = 0;
+    return;
+  end
+end
+
+% Then we were succesful
+varargout{1} = 1;
+
+% END
\ No newline at end of file