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

    function constructors = getWrapperConstructorForObject(oopObjects)
%GETWRAPPERCONSTRUCTORFOROBJECT Returns a constructor for a wrapper class.
%
% CONSTRUCTOR = GETWRAPPERCONSTRUCTORFOROBJECT( OOPOBJECTS )
%
% Where OOPOBJECTS is either an oop object or a cell array of oop objects

%   Copyright 2004-2014 The MathWorks, Inc.


persistent theModelConstructorLookup

if isempty(theModelConstructorLookup)
   
    ext = mbcextensions.Extensions.Model;    
    mapFile = ext.CmdLineClassMappingFile;   
    % this will error if mapFile does not exist.
    theModelConstructorLookup = mbcmodel.objectlookup.makeLookup( mapFile );
    
end
constructors = theModelConstructorLookup.lookup(oopObjects);