fb-doc  0.4.0
FreeBASIC documentation tool
fbdoc_emit_doxy.bas File Reference

Emitter for Doxygen templates. More...

#include "fbdoc_options.bi"
#include "fbdoc_version.bi"
Include dependency graph for fbdoc_emit_doxy.bas:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

SUB_CDECL doxy_entryListPara (BYVAL_AS_Parser_PTR P)
 Emitter to generate a line for a parameter list entry. More...
 
SUB_CDECL doxy_func_ (BYVAL_AS_Parser_PTR P)
 Emitter to generate a template for a function. More...
 
SUB_CDECL doxy_decl_ (BYVAL_AS_Parser_PTR P)
 Emitter to generate a template for a declaration. More...
 
SUB_CDECL doxy_defi_ (BYVAL_AS_Parser_PTR P)
 Emitter to generate a templates for a macro. More...
 
SUB_CDECL doxy_emitBlockNames (BYVAL_AS_Parser_PTR P)
 Emitter to generate a line for a block entry. More...
 
SUB_CDECL doxy_Block (BYVAL_AS_Parser_PTR P)
 Emitter to generate templates for blocks. More...
 
SUB_CDECL doxy_empty (BYVAL_AS_Parser_PTR P)
 Emitter for an empty Geany block. More...
 
SUB init_doxy (BYVAL_AS_EmitterIF_PTR Emi)
 Initialize the DoxygenTemplates EmitterIF. More...
 

Variables

const VAR DOXY_START = NL & "/'* "
 the start of a comment block More...
 
const VAR DOXY_END
 the end of a comment block More...
 

Detailed Description

Emitter for Doxygen templates.

This file contains the emitter DoxygenTemplates, which isn't use by any run mode as default. It's used to generate templates for the Doxygen back-end in mode --geany-mode (-g).

The emitters returns all original source code unchanged. Additionally, relevant constructs (statements or code blocks) get prepended by a multi line block of documentation in Doxygen syntax. This works for

  • blocks like TYPE, UNION and ENUM, and
  • statements like SUB, FUNCTION, VAR, DIM, CONST, COMMON, EXTERN, STATIC, #DEFINE and #MACRO

The documentation template contains

  • the C declaration of the construct
  • a line for the brief description
  • the list of members (including keyword like param or var)
  • the description area
  • a footer

The placeholder FIXME is used to mark the positions where the documentation context should get filled in. See section SubSecExaDoxy for an example.

Note
Since the prefered way to document with Doxygen is to write the comment in front of or behind a statement, this emitter is mostly helpful for documenting functions and their parameter lists.

Definition in file fbdoc_emit_doxy.bas.

Function Documentation

SUB_CDECL doxy_entryListPara ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a line for a parameter list entry.

Parameters
Pthe parser calling this emitter

This emitter gets called when the parser is in a parameter list of a function (SUB FUNCTION PROPERTY CONSTRUCTOR DESTRUCTOR). It generates a line for each parameter and sends it (them) to the output stream.

Definition at line 56 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL doxy_func_ ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a template for a function.

Parameters
Pthe parser calling this emitter

This emitter gets called when the parser finds a function (SUB FUNCTION PROPERTY CONSTRUCTOR DESTRUCTOR). It generates a template to document the function and its parameter list and sends it to the output stream.

Definition at line 72 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL doxy_decl_ ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a template for a declaration.

Parameters
Pthe parser calling this emitter

This emitter gets called when the parser is in a declaration (VAR DIM CONST COMMON EXTERN STATIC). It generates a line for each variable name and sends it (them) to the output stream.

Definition at line 95 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL doxy_defi_ ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a templates for a macro.

Parameters
Pthe parser calling this emitter

This emitter gets called when the parser finds a macro (#DEFINE #MACRO). It generates a template to document the macro and sends it to the output stream.

Definition at line 144 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL doxy_emitBlockNames ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a line for a block entry.

Parameters
Pthe parser calling this emitter

This emitter gets called when the parser is in a block (TYPE ENUM UNION). It generates a line for each member and sends it (them) to the output stream.

Definition at line 162 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL doxy_Block ( BYVAL_AS_Parser_PTR  P)

Emitter to generate templates for blocks.

Parameters
Pthe parser calling this emitter

This emitter gets called when the parser finds a block (TYPE UNION ENUM). It generates a template to document the block with one line for each member and sends it to the output stream.

Definition at line 187 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL doxy_empty ( BYVAL_AS_Parser_PTR  P)

Emitter for an empty Geany block.

Parameters
Pthe parser calling this emitter

This emitter gets called when an empty block gets send by Geany. It generates a template to document the source file and sends it to the output stream.

Definition at line 223 of file fbdoc_emit_doxy.bas.

Here is the caller graph for this function:

SUB init_doxy ( BYVAL_AS_EmitterIF_PTR  Emi)

Initialize the DoxygenTemplates EmitterIF.

Parameters
EmiThe EmitterIF to initialize

FIXME

Since
0.4.0

Definition at line 240 of file fbdoc_emit_doxy.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const VAR DOXY_START = NL & "/'* "

the start of a comment block

Definition at line 39 of file fbdoc_emit_doxy.bas.

const VAR DOXY_END
Initial value:
= NL
& NL & TOFIX
& NL
& NL & "\since " & TOFIX
const VAR NL
separator for lines (unix version)
const VAR TOFIX
the text to initialize entry fields (in templates)
const VAR COMM_END
the end of an FB comment block (in templates)

the end of a comment block

Definition at line 40 of file fbdoc_emit_doxy.bas.