Create new batch builder [USAGE] [data] = project_mgr_builder_add(<data>); [IN] data : project_mgr data [OUT] data : project_mgr data(updated) name : added builder name Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [data, name] = project_mgr_builder_add(data) 0002 % Create new batch builder 0003 % [USAGE] 0004 % [data] = project_mgr_builder_add(<data>); 0005 % [IN] 0006 % data : project_mgr data 0007 % [OUT] 0008 % data : project_mgr data(updated) 0009 % name : added 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 0025 % Make new builder 0026 Nbuilders = length(data.batch_builders); 0027 name = ['batch builder' num2str(Nbuilders+1)]; 0028 data.batch_builders{Nbuilders+1, 1} = vb_batch_mgr_new(name); 0029 0030 % Save builders to file 0031 batch_builders = data.batch_builders; 0032 result = vb_save(data.project_file, 'batch_builders'); 0033 0034 % 0035 % --- After check 0036 % 0037 if nargout < 1 0038 error('function caller should receive this object.'); 0039 end