www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@project/pInitialise.m

    function pInitialise(obj, P)
%PINITIALISE Private function.
%
%  PINITIALISE( PROJECT, MDEVPROJECT )
%  

%   Copyright 2004-2005 The MathWorks, Inc.
%       .

if nargin < 2
    % Need to create a new project to use
    P = mdevproject('Untitled', [], []);
elseif isa(P, 'xregpointer') && P ~= 0
    % Convert a pointer to the actual object
    P = info(P);
end

if isa(P, 'mdevproject')
    obj.super(mfilename('fullpath'), address(P));
else
    error(message('mbc:mbcmodel:project:InvalidArgument8'));
end

% Set the Project to which this Project belongs
obj.Project = obj;