Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/create_class_desc/create_class_desc.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 function create_class_desc() | |
2 | |
3 | |
4 ltpdaclasses = utils.helper.ltpda_userclasses(); | |
5 | |
6 | |
7 main_link_box{1,1} = 'Properties'; main_link_box{1,3} = 'Properties of the class'; | |
8 main_link_box{2,1} = 'Methods'; main_link_box{2,3} = 'All Methods of the class ordered by category.'; | |
9 main_link_box{3,1} = 'Examples'; main_link_box{3,3} = 'Some constructor examples'; | |
10 | |
11 for ii = 1:length(ltpdaclasses) | |
12 | |
13 class_name = ltpdaclasses{ii}; | |
14 | |
15 html_filename = sprintf('class_desc_%s.html', class_name); | |
16 | |
17 if ismember(class_name, ltpdaclasses) | |
18 html_example_filename = sprintf('constructor_examples_%s.html', class_name); | |
19 else | |
20 html_example_filename = 'constructor_examples_main.html'; | |
21 end | |
22 | |
23 meta_obj = meta.class.fromName(class_name); | |
24 | |
25 main_link_box{1,2} = [html_filename '#top_properties']; | |
26 main_link_box{2,2} = [html_filename '#top_methods']; | |
27 main_link_box{3,2} = html_example_filename; | |
28 | |
29 outfile = sprintf('../ug/class_desc_%s_content.html', class_name); | |
30 | |
31 fid_write = fopen(outfile, 'w'); | |
32 | |
33 fprintf(fid_write, '<!-- $Id: create_class_desc.m,v 1.7 2011/05/12 19:40:58 ingo Exp $ -->\n\n'); | |
34 | |
35 fprintf(fid_write, ' <!-- ================================================== -->\n'); | |
36 fprintf(fid_write, ' <!-- BEGIN CONTENT FILE -->\n'); | |
37 fprintf(fid_write, ' <!-- ================================================== -->\n'); | |
38 | |
39 create_link_box(fid_write, 2, main_link_box, 'categorylist') | |
40 | |
41 fprintf(fid_write, ' <!-- ===== Back to Class descriptions ===== -->\n'); | |
42 fprintf(fid_write, ' <a href="class_desc_main.html">\n'); | |
43 fprintf(fid_write, ' <img src="doc_to_top_up.gif" border="0" align="bottom" alt="Back to Class descriptions"/>\n'); | |
44 fprintf(fid_write, ' Back to Class descriptions\n'); | |
45 fprintf(fid_write, ' </a>\n\n'); | |
46 | |
47 create_property_desc(fid_write, meta_obj, 2); | |
48 | |
49 create_methods_desc(fid_write, meta_obj, html_filename, 2) | |
50 | |
51 fprintf(fid_write, ' <!-- ================================================== -->\n'); | |
52 fprintf(fid_write, ' <!-- END CONTENT FILE -->\n'); | |
53 fprintf(fid_write, ' <!-- ================================================== -->\n'); | |
54 | |
55 fclose(fid_write); | |
56 | |
57 end | |
58 | |
59 end | |
60 |