www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@xregbdrydev/xregbdrydev.m

    function this = xregbdrydev( varargin )
%XREGBDRYDEV A node in a boundary modeling tree of models.
%
%  R = XREGBDRYDEV(NAME,...) is a boundary modeling tree node object
%  with the given NAME. XREGBDRYDEV objects are child objects of
%  XREGBDRYNODE. 
%  
%  See also: XREGBDRYNODE, MCTREE.

%  Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc.


% If the first argument is an xregbdrydev, then return it
if nargin >= 1 && isa( varargin{1}, 'xregbdrydev' ),
    this = varargin{1};
    return
end

if nargin == 1 && isstruct( varargin{1} ),
    putOnHeap = false; % Don't put on heap for load constructors
    this = varargin{1};
    parent = this.xregbdrynode;
    this = mv_rmfield( this, 'xregbdrynode' );
else
    % Pnly put object on heap if there were input arguments
    putOnHeap = nargin >= 1;
    
    % Create parent object
    parent = xregbdrynode( varargin{:} );

    % Setup object structure
    this = struct( ...
        'Version', 2.0, ...
        'Constraint', [], ...
        'BoundaryPoints', [], ...
        'SpecialPoints', [], ...
        'ConstraintFitOptions', [], ...
        'BoundaryPointOptions', [], ...
        'SpecialPointOptions', [], ...
        'Status', uint8( 0 ) ); % status of the fit process
end
this = orderfields( this );
% Instantiate object
this = class( this, 'xregbdrydev', parent );

% Put object on heap, but only put if there were input arguments
if putOnHeap,
    this = info( xregpointer( this ) ); 
end

return