function outstruct = parseClassDef(model)
outstruct = struct;
txt = get(model.txtClassDef,'String');

% txt =txt(find(all(isspace(txt(i,:))) ???

nClasses = size(txt,1); % clear empty lines!

outstruct.eventMatrix = [];

for i = 1:nClasses
    line = txt(i,:);
    delim = strfind(line,','); %first and last are real delimiter

    outstruct.labelCells{i} = strtrunc(line(1:delim(1)-1));
    outstruct.conditionCells{i} = eval(strtrunc(line(delim(1)+1:delim(length(delim))-1)));
    outstruct.eventMatrix   = [outstruct.eventMatrix ; outstruct.conditionCells{i}];
    outstruct.valueCells{i} = strtrunc(line(delim(length(delim))+1:length(line)));
end

end