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

Emitter for gtk-doc templates. More...

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

Go to the source code of this file.

Functions

SUB_CDECL gtk_emit_Name (BYVAL_AS_Parser_PTR P)
 Emitter to generate a name line. More...
 
SUB_CDECL gtk_defi_ (BYVAL_AS_Parser_PTR P)
 Emitter to generate a macro template. More...
 
SUB_CDECL gtk_decl_ (BYVAL_AS_Parser_PTR P)
 Emitter to generate a template for a declaration. More...
 
SUB_CDECL gtk_func_ (BYVAL_AS_Parser_PTR P)
 Emitter to generate a template for a function. More...
 
SUB_CDECL gtk_emitBlockNames (BYVAL_AS_Parser_PTR P)
 Emitter to generate a line for a block entry. More...
 
SUB_CDECL gtk_Block (BYVAL_AS_Parser_PTR P)
 Emitter to generate templates for blocks. More...
 
SUB_CDECL gtk_empty (BYVAL_AS_Parser_PTR P)
 Emitter for an empty Geany block. More...
 
SUB init_gtk (BYVAL_AS_EmitterIF_PTR Emi)
 Initialize the GtkDocTemplates EmitterIF. More...
 

Variables

const VAR SINCE = NL & "Since: 0.0"
 text added at each block end More...
 
const VAR GTK_START = "/'* "
 the start of a comment block More...
 
const VAR GTK_END
 the end of a comment block More...
 

Detailed Description

Emitter for gtk-doc templates.

This file contains the emitter called "GtkDocTemplates", used as default emitter to generate templates for the gtk-doc 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 name of the construct, appended by a colon
  • the list of members with a leading @ character (parameters in case of a SUB FUNCTION or member variables in case of a block)
  • the description area
  • a footer

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

Definition in file fbdoc_emit_gtk.bas.

Function Documentation

SUB_CDECL gtk_emit_Name ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a name line.

Parameters
Pthe parser calling this emitter

Generate a name for a gtk-doc template. Used in lists (parameters or variable declarations) or blocks (ENUM, TYPE, UNION). It generates a line to document the variable and sends it to the output stream.

Definition at line 50 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL gtk_defi_ ( BYVAL_AS_Parser_PTR  P)

Emitter to generate a macro template.

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 65 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL gtk_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 81 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL gtk_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 109 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL gtk_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 136 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL gtk_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 160 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

SUB_CDECL gtk_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 184 of file fbdoc_emit_gtk.bas.

Here is the caller graph for this function:

SUB init_gtk ( BYVAL_AS_EmitterIF_PTR  Emi)

Initialize the GtkDocTemplates EmitterIF.

Parameters
EmiThe EmitterIF to initialize

FIXME

Since
0.4.0

< we use the standard error emitter here

Definition at line 209 of file fbdoc_emit_gtk.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const VAR SINCE = NL & "Since: 0.0"

text added at each block end

Definition at line 34 of file fbdoc_emit_gtk.bas.

const VAR GTK_START = "/'* "

the start of a comment block

Definition at line 35 of file fbdoc_emit_gtk.bas.

const VAR GTK_END
Initial value:
= NL &
NL & TOFIX &
NL & SINCE &
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)
const VAR SINCE
text added at each block end

the end of a comment block

Definition at line 36 of file fbdoc_emit_gtk.bas.