Skip to main content

getTerminalConstraintTerms.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% Parses XML settings for a RCNLTerminalConstraintTerms, adding all fields
% included in the xml block.
%
% (struct) -> (struct)
% Parses settings from a RCNLTerminalConstraintTerms.


function terminal = getTerminalConstraintTerms(tree)
terminalConstraintTermsTree = getFieldByName(tree, ...
'RCNLTerminalConstraintTerms');
if(isstruct(terminalConstraintTermsTree))
terminalConstraints = getFieldByName(terminalConstraintTermsTree, ...
"RCNLConstraintTerm");
if isstruct(terminalConstraints) || iscell(terminalConstraints)
terminal = parseRcnlConstraintTermSet(terminalConstraints);
else
terminal = {};
end
else
terminal = {};
end