www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcfoundation/@pointerinterface/pointerinterface.m
function obj = pointerinterface(varargin) %POINTERINTERFACE constructor % % obj = POINTERINTERFACE(newPointer) % obj = POINTERINTERFACE(pointerinterface, newPointer) % % The first constructor is for use outside a class derived from this one. % The second constructor is for any class which wishes to aggregate a % pointerinterface object and is itself derived from pointerinterface. In % this case the user should call obj.pointerinterface(xregpointer) which % will create a new instance of this class. % Copyright 2004-2005 The MathWorks, Inc. % Create the underlying object obj = mbcfoundation.pointerinterface; % Let's deal with subclasses of pointerinterface needing to aggregate a % pointerinterface (see the cageabstractnode.pInitialise method for an % example - We will relax the check to see if varargin{1} is a handle. This % should really check isa(varargin{1}, 'pointerinterface') but that might % be a little time consuming if length(varargin) > 0 && ishandle(varargin{1}) % Remove the dispatching object varargin(1) = []; end % And call the initialisation function obj.pInitialise(varargin{:});