www.gusucode.com > datastoreio工具箱 matlab源码程序 > datastoreio/+matlab/+io/+datastore/+internal/getAvailableDatastores.m

    function dsClsNames = getAvailableDatastores()
%getAvailableDatastores   Find the available datastore classes.
%   This function returns a cell array containing fully qualified names of
%   classes in the matlab.io.datastore package that are not abstract.

%   Copyright 2014 The MathWorks, Inc.

% all datastores must be in the matlab.io.datastore package
dsPkg = meta.package.fromName('matlab.io.datastore');

% filter out abstract classes
% we expect all concrete classes in matlab.io.datastore to be datastores
dsClsNames = { dsPkg.ClassList( not([dsPkg.ClassList.Abstract]) ).Name };

% sort the datastores by classname so that the order of listing is consistent
% across platforms and consistent when datastores are added in packaged folders
% in different toolboxes
if ~isempty(dsClsNames)
    dsClsNames = sort(dsClsNames);
end

end