3 Template documentation
MkHelp can generate template documentation that you can complete by hand with your
favorite editor. Template doc is very usefull to annotate HTML generated files with
your own remarks.
exemple :
suppose the input file foo.i
=================== foo.i======================================
class foo
{
int a;
public :
foo() : a(0) {}
foo(int i) : a(i) {}
};
===================== end of file ===========================
Run this command
>mkhelp -P -d -ld c:.\doc\ -lo c:.\html\ foo.i
MkHelp generate two kind of files : .doc files and .html files.
Look at the foo.doc file (in .\doc dir) :
================== foo.doc ============================
//
//File description for class foo
//
//
VERSION{0.1}
AUTHORS{unknow}
COMMENT{
}
[data]
int a{<br>
}
[function]
foo() {<br>
}
foo(int) {<br>
}
================== end of file ============================
As you can see, this file is divided in three sections.
The first starts from the begining of the
file to the [data] section. This header section contains three items VERSION, AUTHORS and COMMENT. Each
item starts with '{' and terminates by '}' (this is a general rule for every items).
- VERSION : 0.1 is the default value, you can put here what you want. (ex : 1.0.22.A)
- AUTHORS : you can replace unknown by tom, mary, john
- COMMENT : this item is inserted just under the class banner in html file. It's the general
description of the class. You can put here ASCII text, html text (nice for ANCHOR or IMG).
Warning : All CR/LF are converted in <br> sequences, not the case in other items.
[data] Section
In this section you can found all datas from the refered class.
int a{<br> You can put here any ASCII or HTML text. As long as you want.
}
[function] Section
In this section you can found all functions from the refered class.
foo() {<br> You can put here any ASCII or HTML text. As long as you want.
}
foo(int) {<br> You can put here any ASCII or HTML text. As long as you want.
}
As you can see, only parameter type is needed for the function, not the variable name.
When you have filled all these sections, you must recall MkHelp to include you own remarks
in HTML generated files by the following command :
>Mkhelp -ld c:.\doc\ -lo c:.\html\ foo.i
Warning :
Usually, you generate the doc template files once. Dont rerun MkHelp with -d option,
otherwise all your doc files will be overwritten !!!!