function [ret, groups] = getUndefines(h, varargin)
% GETUNDEFINES - The getUndefines function returns preprocessor macro
% definitions that will be undefined. Using optional includeGroups and
% excludeGroups arguments, you can selectively include or exclude groups
% of definitions the function is to return.
%
% If you choose to specify excludeGroups and omit includeGroups, specify a
% null string ('') for includeGroups.
%   
% Argument      description
% buildinfo     Build information handle returned by RTW.Buildinfo.
% 
%
% includeGroups (optional) A character array or cell array of character arrays
%               that specifies groups of macro definitions you want the
%               function to return.
% excludeGroups (optional) A character array or cell array of character arrays
%               that specifies groups of macro definitions you do not want
%               the function to return.
%
% Return values
% The function returns the preprocessor macro definitions currently in
% the model's build information. 
%
% example 1:   
%   myModelBuildInfo = RTW.BuildInfo;
%   addUndefines(myModelBuildInfo, {'DEBUG' 'test'},... 
%                   {'Debug' 'Release'});
%   undefs=getUndefines(myModelBuildInfo);
%
%   resulting values:
%   undefs == {'DEBUG' 'test'}
%
% example 2:
%   myModelBuildInfo = RTW.BuildInfo;
%   addUndefines(myModelBuildInfo, {'DEBUG' 'test'},... 
%                   {'Debug' 'Release'});
%   undefs=getUndefines(myModelBuildInfo, '', 'Release');
%
%   resulting values:
%   undefs == {'DEBUG'}
%

% Copyright 2023 The MathWorks, Inc.
[varargin{:}] = convertStringsToChars(varargin{:});
[ret, ~, ~, groups] = h.Options.getOptions('Undefines',varargin{:}); % Keys and Values can be ignored as undefines aren't of type key-value pair
