classdef ConfigDb < extmgr.ConfigurationSet
    %

    %   Copyright 2004-2021 The MathWorks, Inc.

    % This class is only here to load legacy files. DO NOT USE
    methods
        function this = ConfigDb
        end
    end

    methods (Hidden)
        function s = saveobj(this)
            s = saveobj@extmgr.ConfigurationSet(this);
            s.class = 'extmgr.ConfigDb';
        end
    end
    
    methods (Static)
        function this = loadobj(s)
            this = extmgr.ConfigurationSet();
            if isfield(s, 'Children')
                for indx = 1:numel(s.Children)
                    config = s.Children(indx);
                    this.add(config.Type, config.Name, config.Enable, config.PropertyDb);
                end
            end
            if isfield(s, 'AllowConfigEnableChangedEvent')
                this.AllowConfigEnableChangedEvent = s.AllowConfigEnableChangedEvent;
            end
        end
    end
end
