rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
show_abstract_members.m
Go to the documentation of this file.
1 function show_abstract_members(class_name)
2  % function show_abstract_members(class_name)
3  % displays unimplemented abstract methods of class with name 'class_name'
4  m = meta.class.fromName(class_name);
5 
6  a_props = m.Properties(cellfun(@(x) x.Abstract, m.Properties));
7  una_props = m.Properties(cellfun(@(x) ~x.Abstract, m.Properties));
8  a_props_names = cellfun(@(x) x.Name, a_props, 'UniformOutput', false);
9  una_props_names = cellfun(@(x) x.Name, una_props, 'UniformOutput', false);
10  a_props_names = setdiff(a_props_names, una_props_names);
11 
12  a_methods = m.Methods(cellfun(@(x) x.Abstract, m.Methods));
13  una_methods = m.Methods(cellfun(@(x) ~x.Abstract, m.Methods));
14  a_methods_names = cellfun(@(x) x.Name, a_methods, 'UniformOutput', false);
15  una_methods_names = cellfun(@(x) x.Name, una_methods, 'UniformOutput', false);
16  a_methods_names = setdiff(a_methods_names, una_methods_names);
17 
18  if ~isempty(a_props)
19  disp(['Unimplemented abstract properties in ', class_name, ' are:']);
20  disp(a_props_names);
21  end
22 
23  if ~isempty(a_methods)
24  disp(['Unimplemented abstract methods in ', class_name, ' are:']);
25  disp(a_methods_names);
26  end
27 end
function show_abstract_members(class_name)
displays unimplemented abstract methods of class with name class_name