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

    function e = pAssertNotBeingEdited(obj, message)
%PASSERTNOTBEINGEDITED -- 
%
%  E = PASSERTNOTBEINGEDITED(OBJ)
%  E = PASSERTNOTBEINGEDITED(OBJ, MESSAGE)
%
%  See also PASSERTISBEINGEDITED.

%  Copyright 2006 The MathWorks, Inc.

if nargin<2,
    message = 'Model object is currently being edited, call MBCMODEL.MODEL.FIT before use';
end

if ~obj.IsBeingEdited,
    e = struct( 'identifier', {}, 'message', {} );
else
    e = struct( ...
        'identifier', 'mbc:mbcmodel:model:InvalidState', ...
        'message', message );
end