AutoDoc has a few parameter files in the "res" sub-directory, which control the behavior of the program. With these files, it is possible to extend AutoDoc by adding new tags, groupings, and texts.
However, changing these files is potentially dangerous and may lead to AutoDoc not working properly. Therefore, it is strongly recomended, that you don't change these files directly, but rather make a copy of the whole directory (e.g. to a directory named "my_res") and apply your changes to this copy. You can then use the "-res" parameter to point to this changed copy.
Please note, that these files are subject to permanent changes. So, it is your responsibilty, to synchronize the original files with your changed files after every AutoDoc update. Since those are normal text files, you can use a file comparison program, like WinMergeTM or Beyond CompareTM to help you sychronize these files.
The main files are:
Filename | Description |
---|---|
AutoDocTagDictionary.txt | Contains all the tag definitions. |
AutoDocFileExtensionDefaults.txt | Contains the settings for the file extensions / programming languages. |
AutoDocGroupings.txt | Contains the grouping definitions for the navigation tree on the left side of the TreeView. |
AutoDocUserGroupDefs.txt | Contains user defined group definitions to be used in "@ingroup" tags.. |
The language specific files are stored in sub-directories "en" for English and "de" for German. These files are selected by the "-locale" parameter. You can add you own translations by creating an own sub-directory with the language code of your preferred language, copy the files to it and translating all the texts to this language. The files are:
Filename | Description |
---|---|
lang/TagTexts.txt | Contains the texts for all AutoDoc tags. |
lang/AutoDocMessages.txt | Contains the messages of the AutoDoc program. |
The file "res/AutoDocTagDictionary.txt" contains the definitions for all Tags, which AutoDoc understands. It is a text file, containing a row for every tag definition and the columns are separated by commas (","). The columns are:
Column | Description |
---|---|
1 | ID: Contains the unique key of an AutoDoc tag (e.g. "L4_AUTHOR"). |
2 | Tag name: Contains the tag name (e.g. "author"). |
3 | Level: Contains the tag level (1 = file, 2 = structural, 3 = functional, 4 = sub, 5 = inline). |
4 | Number of parameters the tag is expecting. |
5 | Sort Index, only relevant for functional tags. |
6 | Special type flags (see below). |
In the sixth column, one or more type flags can be defined. This is a list of the currently used flags:
Type Flag | Usable for | Description |
---|---|---|
overwrite | Any Tag | Overwrites a previously defined AutoDoc Tag Dictionary entry. |
exclude | File Tags | Exclude file from output. |
class | Structural Tags | Marks a Class. |
classtype | Structural Tags | Marks a type similar to a Class (works as modifier for class, interface). |
include | Structural Tags | Marks an include. |
interface | Structural Tags | Marks an interface. |
section | Structural Tags | Marks a program section. |
var | Functional Tags | Marks a variable. |
func | Functional Tags | Marks a function. |
libname | Functional Tags | Marks a libname. |
keeppre | Functional Tags | Marks a pre-formatted element (works as modifier). |
remote | Functional Tags | Marks a remote libname (works as modifier to the libname flag). |
beginsrcquote | Sub-Tags | Marks the @beginsrcquote tag. |
brief | Sub-Tags | Marks a brief description tag. |
call | Sub-Tags | Marks a function / macro call. |
comment | Sub-Tags | Marks comment, output to the generated documentation is suppressed. |
details | Sub-Tags | Marks a detailed description tag. |
directory | Sub-Tags | Marks the @directory tag. |
endsrcquote | Sub-Tags | Marks the @endsrcquote tag. |
entity | Sub-Tags | Marks a organizational entity tag (see Groupings Definitions file). |
group | Sub-Tags | Marks a group tag (see Groupings Definitions file). |
package | Sub-Tags | Marks a package / namespace / module like tag (see Groupings Definitions file). |
person | Sub-Tags | Marks a person (see Groupings Definitions file). |
properties | Sub-Tags | Marks a file properties tag (see Groupings Definitions file). |
usection | Sub-Tags | Marks a user section (@section) tag. |
bold | Inline Tags | Marks a bold tag (works as modifier). |
code | Inline Tags | Marks a code tag (works as modifier). |
doublequote | Inline Tags | Marks a double quote tag (works as modifier). |
emphasized | Inline Tags | Marks an emphasized tag (works as modifier). |
extlink | Inline Tags | Marks a @extlink tag (works as modifier). |
image | Inline Tags | Marks an @image tag (works as modifier). |
italic | Inline Tags | Marks a italic tag (works as modifier). |
link | Inline Tags | Marks a @link tag (works as modifier). |
newline | Inline Tags | Marks the a @newline tag (works as modifier). |
singlequote | Inline Tags | Marks a single quote tag (works as modifier). |
strike | Inline Tags | Marks a strike through tag (works as modifier). |
typewriter | Inline Tags | Marks a typewriter tag (works as modifier). |
underline | Inline Tags | Marks an underline tag (works as modifier). |
The file "res/lang/TagTexts.txt" contains the texts for the output of the tags, where lang is the language selected by the "-locale" parameter. It is a text file, containing a row for every tag definition and the columns are separated by commas (","). The columns are:
Column | Description |
---|---|
1 | ID: Contains the unique key of an AutoDoc tag as in the Tag Dictionary. |
2 | Text / Label for output. |
The file "res/lang/AutoDocMessages.txt" contains the texts for the program output of AutoDoc, where lang is the language selected by the "-locale" parameter. It is a text file, containing a row for every message and the columns are separated by commas (","). The columns are:
Column | Description |
---|---|
1 | Message ID. |
2 | Text for output. |
Some of the message texts may contain parameter placeholders "%1%", "%2%", etc.
The file "res/AutoDocGroupings.txt" contain the definition of the groupings shown on the left side of the TreeView output. It is a text file, containing a row for every grouping and the columns are separated by commas (","). The columns are:
Column | Description |
---|---|
1 | Name of the grouping (currently ignored). |
2 | Key of the grouping in the AutoDoc Tag Dictionary file. |
3 | Character used to split sub-groups. |
4 | Processing type ("Group", "Simple", or "Complex"). |
5 | Force to a certain tag level (0 = all levels, 1 = file tags only). |
6 | Clean trailing word delimiters (0 = no, 1 = yes). |
7 | Message ID of the header text (refering to AutoDoc Message Texts file). |
The groupings are output in the TreeView on the left side of the output in the order they appear in this file. The key in the second column must be identical to a Type Flag in the AutoDoc Tag Dictionary file.
The 7th column contains the Message ID in the AutoDoc Message Texts file containing the Header of the TreeView segment. Alternatively you can specify the heading as text, but then the heading cannot be localized to your output language specified by the "-locale" parameter.
The 4th column contains the processing type for this grouping. There are 3 possible values:
Value | Description |
---|---|
Group | Reserved for the @group tag and it's aliasses. |
Simple | A simple grouping, like "Package / Namespace / Module", or "Programming Language". |
Complex | A more complex grouping, like "Persons", "File Properties", or "Organizational Entities". |
In this file the user can define standardized groups to be used with the "@group" tag. They are stored in the file "res/AutoDocFileExtensionDefaults.txt" and is a text file, containing a row for every file extension definition and the columns are separated by commas (","). The file has 2 columns:
Column | Description |
---|---|
1 | Unique group ID. |
2 | Replacement group definition. |
The current file extension defaults for the block makers are stored in the file "res/AutoDocFileExtensionDefaults.txt". It is a text file, containing a row for every file extension definition and the columns are separated by commas (","). The columns are:
Column | Description |
---|---|
1 | List of file extensions, separated by commas, * as default. |
2 | Block begin marker. |
3 | Block end marker. |
4 | Quote character. |
5 | Description. |
This is how they are currently defined:
Extensions | Block Begin | Block End | Quote Char | Description |
---|---|---|---|---|
* | /*! | */ | " | Default |
asp | '*! | *!' | " | Active Server Pages |
au3 | ;*! | !*; | " | AutoIt |
bat | rem ! | *! | " | DOS / Win Batch File |
c, cpp, cxx, h, hpp, hxx, cc | /*! | */ | " | C/C++ |
cs | /*! | */ | " | C# |
cobol, cob, cbl, ovd | 07 ! | !! | " | Cobol |
c02 | *>! | !<* | " | Cobol 2002 |
css | /*! | */ | " | Cascading Stylesheets CSS |
d | /*! | */ | " | D |
f, for, f90, f95, f2k | C !* | *! | " | Fortran |
htm, html, xhtml, xhtm | <!--! | --> | " | HTML |
java | /*! | */ | " | Java |
js | /*! | */ | " | Javascript |
jsp | /*! | */ | " | Java Server Pages |
lisp | ;*! | !*; | " | Lisp |
nsi | #*! | *# | " | NSIS Installer Script |
pas | (*! | !*) | " | Pascal |
php | /*! | */ | " | PHP |
py | #* | *# | " | Python |
r | #*! | *# | " | R |
sas | /*! | */ | " | SAS |
sql | --! | *!- | " | SQL |
sh, csh, ksh, bsh | #*! | *# | " | Unix Shell Script |
sm | "*! | *!" | ' | Smalltalk |
tex | %*! | *%" | ' | TeX / LaTeX |
vba, bas, vb, vbs | '*! | *!' | " | Visual Basic |
xml | <!--! | --> | " | XML |
The simplest way to extend AutoDoc is to define an alias for an existing tag. You can accomplish this by perfoming these steps:
For example, if you want to create an alias for the "@saslibname" tag and want to use the new tag "@libname", add the following line to the end of the file:
L3_LIBNAME, "libname", 3, 3, 0, "libname"
Now, you can use "@libname" and it works exactly as "@saslibname".
Sometimes you want to change the behaviour of an exsiting tag slightly, for example when you want to add it to a grouping.
Rather than changing existing tags directly in the AutoDoc Tag Dictionary file in the res sub-directory, it is recomended to copy the respecting entry for the tag to the end of the file and to use the overwrite flag. This way it is easier to synchronize the settings, when a new AutoDoc version is available, because all of your changes are at the bottom of the AutoDoc Tag Dictionary file. The steps are:
For example, if you want entries for the "@freq" tag to appear in the "File properties" grouping in the TreeView on the left side, normally you only need to add the groupings key "properties" to the type flags column. So first copy the entry of the "@freq" tag to the bottom of the file and add the flags "properties" and "overwrite" as shown below.
L4_FREQ, "freq", 4, 1, 0, "properties, overwrite"
Simple tags can be added easily, especially if they are Sub-Tags (Level = 4). You can accomplish this by perfoming these steps:
For example, when you want to add the new sub-tag "@clientaddress", you can add the following line to the end of your AutoDocTagDictionary.txt file:
L4_MYCLIENTADDRESS, "clientaddress", 4, 1, 0, ""
The level is 4 (for Sub-Tag), the tag has 1 parameter, sort index 0 is not relevant here, and there are no special flags.
Then you add the text to the end of your TagTexts files in all locale directories, e.g. for English:
L4_MYCLIENTADDRESS, "Client's Adress"
If you want to create a new grouping for the TreeView on the left side of the output, you have to follow these steps with the files in the res sub-directory:
For example, you want add a new Sub-Tag "@project" expecting one parameter and want to show it in a separate grouping "Project" in the TreeView. First, you have to create the Header text for the grouping in lang/AutoDocMessages.txt for each language, for example for English:
MSG_OUTMYPROJECT, "Project"
Next, you add an entry to AutoDocGroupings.txt:
"Project", "myproject", ";", "Simple", 1, 1, "MSG_OUTMYPROJECT"
The key of this grouping is "myproject" and for the delimiter we can use the same as in the Persons grouping. The processing type is "Simple", because we want to create a simple list for this grouping, like in "Programming Language". The 1 in the next parameter makes sure, only Sub-Tags of File Tags are to be considered, and the next 1 tells AutoDoc to clean word delimiters at the end. The last parameter refers to the Header message ID you created in the lang/AutoDocMessages.txt files. Next we create a the Sub-Tag in the AutoDocTagDictionary.txt file:
L4_MYPROJECT, "project", 4, 1, 0, "myproject"
The unique key is "L4_MYPROJECT" and the tag name is "project". The level of the tag is 4 for Sub-Tag, it requries 1 parameter and the sorting order is irrelevant for Sub-Tags. The grouping key defined in the AutoDocGroupings.txt file is set as special type flag in the last column. Now, you have to add the Tag text to the lang/TagTexts.txt files for each language using the same unique key as in the AutoDocTagDictionary.txt file. For English, this could be:
L4_MYPROJECT, "Project"
Now, you can use "@project Description" as a new Sub-Tag inside a File Tag and then a new Grouping in the TreeView is generated. For example:
/*! * @program Test Program. * * @author Daniel Enache * @version 1.0 * @date 30.01.2016 * @project Test. */