Home > vbmeg > functions > gui > project_mgr_dir > project_mgr_builder_remove.m

project_mgr_builder_remove

PURPOSE ^

Remove batch builder

SYNOPSIS ^

function [data, name] = project_mgr_builder_remove(data)

DESCRIPTION ^

 Remove batch builder
 [USAGE]
    [data] = project_mgr_builder_remove(<data>);
 [IN]
    data : project_mgr data
 [OUT]
    data : project_mgr data(updated)
    name : removed builder name

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [data, name] = project_mgr_builder_remove(data)
0002 % Remove batch builder
0003 % [USAGE]
0004 %    [data] = project_mgr_builder_remove(<data>);
0005 % [IN]
0006 %    data : project_mgr data
0007 % [OUT]
0008 %    data : project_mgr data(updated)
0009 %    name : removed builder name
0010 %
0011 % Copyright (C) 2011, ATR All Rights Reserved.
0012 % License : New BSD License(see VBMEG_LICENSE.txt)
0013 
0014 %
0015 % --- Previous check
0016 %
0017 if ~exist('data', 'var')
0018     error('data is a required parameter.');
0019 end
0020 
0021 %
0022 % --- Main Procedure
0023 %
0024 H = data.H;
0025 
0026 % get selected batch builder
0027 idx = get(H.builder_popup, 'Value');
0028 rbuilder = data.batch_builders{idx};
0029 name     = vb_batch_mgr_get_name(rbuilder);
0030 % remove builder
0031 data.batch_builders(idx) = [];
0032 if isempty(data.batch_builders)
0033     data.batch_builders{1} = vb_batch_mgr_new('batch builder1');
0034 end
0035 
0036 % Save builders to file
0037 batch_builders = data.batch_builders;
0038 result = vb_save(data.project_file, 'batch_builders');
0039 
0040 %
0041 % --- After check
0042 %
0043 if nargout < 1
0044     error('function caller should receive this object.');
0045 end

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005