theKernel 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard
c - tcl - py - jv - cc
Loading...
Searching...
No Matches
MkKernel_Parser_Doc_C_API

doc : define the __parser__ attribute related to doxygen integration … More...

+ Collaboration diagram for MkKernel_Parser_Doc_C_API:

Macros

#define __parser__doc_group   doc-group@OVERWRITE=DOC
 Use the doc-group section in the doxygen documentation …
 
#define __parser__doc_index   doc-index=INDEX
 Add index doc-index to the doc-group section …
 
#define __parser__doc_name   doc-name=NAME
 Add name doc-name section to the doc-group section …
 
#define __parser__doc_no   doc-no
 Do not write a doc entry into the doxygen documentation …
 
#define __parser__global__doc_force   doc-force@LIST=CLASS_or_PACKAGE@INDEX@?local?
 Force the doyygen-index to be build even if no function is available …
 
#define __parser__global__doc_db   doc-db=DIRECTORY
 Set directory for external documentation lookup…
 
#define __parser__doc_sort   doc-sort=DICTIONARY
 dictionary doc-sort of the function in the documantation…
 

Detailed Description

doc : define the __parser__ attribute related to doxygen integration …

Define the __parser__(doc-XXX=…) function…, __parser__global__(function:doc-XXX:…) or the __parser__global__(function:…) attribute.

‍The doc-attribute is used to integrate the All-Language-Compiler (ALC) code into the doxygen-documentation.

The documentation is splitted into 3 parts called doc-index, doc-group and doc-name:

The doc-attribute create a doxygen-item:

example of the doc-attribute integration into doxygen:
@addtogroup MyClassC_DocIndex_LNG_Api
@{
@addtogroup MyClassC_DocIndex_DocGroup_LNG_Api
@{
@name DocName - ...
@{
...
@}
@}
@}

The following restrictions are used by the doc-attribute:

The C __parser__ extension does not read the already available doxygen documentation and doc-index and doc-group have to fit into the existing doxygen structure.

example: the doc-attribute integration into doxygen with manually added code:

@defgroup MyClassC_MyIndex_C_API "MyIndexDocStr"
@{
@defgroup MyClassC_MyIndex_MyGroup_C_API "MyGroupDocStr"
@{
__parser__push__(doc-group=MyGroup,doc-index=MyIndex);
...
void my_func_(void);
...
@}
@}
#define __parser__pop__
parser: stop apply a list of local attributes to a block of code …
#define __parser__push__(...)
parser: start apply a list of local attributes to a block of code …

example: the overload-feature (c_Overload.tcl) create the following code for the MkErrorNext function:

@addtogroup MkErrorC_Class_Introspection_C_API
@{
@name MkErrorC_Class_Introspection_C_API - overload
@{
// doc-key: MkErrorC,MkErrorC-Class-Introspection,oc_
#define MkErrorNext_0E() MkErrorNext(&MkERROR)
#define MkErrorNext_1M(m) MkErrorNext(MkErrorFORMAT_1M(m))
@}
@}

Macro Definition Documentation

◆ __parser__doc_group

#define __parser__doc_group   doc-group@OVERWRITE=DOC

Use the doc-group section in the doxygen documentation …

Every function is added to a doc-group section, if no doc-group section is set the default Misc is used.

  • To disable the default Misc value use the _ignore_ value.
  • For detail information about doxygen integration use: doc-index
Definition
scopeglobal or function
usage__parser__global__(FUNCTION:doc-group=DOC);
usage__parser__(doc-group=DOC) FUNCTION ...
see also__parser__(doc-no); __parser__(doc-index)
Example
__parser__(doc-group=Log,doc-index=_ignore_)
MK_EXTERN MK_STRN MK_DECL MkLogTimeoutE (
enum MkTimeoutE val
);
#define MK_DECL
#define MK_EXTERN
static library
MkTimeoutE
Predefined Timeout values …
#define __parser__(...)
parser: apply an attribute to an object in local scope …
const MK_STRB * MK_STRN
constant string pointer data-type

Definition at line 1977 of file parser_mk.h.

◆ __parser__doc_index

#define __parser__doc_index   doc-index=INDEX

Add index doc-index to the doc-group section …

Sometimes there are too many functions in a class for a clear presentation. With the doc-index it is possible to add an additional index-level.

The doc-index is created ONLY when a function is available. If you want the doc-index to always be created, use the global doc-force option such as __parser__global__(doc-force=MyClass@MyIndex);.

Definition
scopeglobal or function
usage__parser__global__(FUNCTION:doc-index:INDEX);
usage__parser__(doc-index=INDEX) FUNCTION ...
see alsodoc-group; doc-name; doc-no

Definition at line 1999 of file parser_mk.h.

◆ __parser__doc_name

#define __parser__doc_name   doc-name=NAME

Add name doc-name section to the doc-group section …

Sometimes a function should be added to the main-doc-class like MkBufferC_C_API, but in a separate namespace to group the functions together or to improve readability.

If the All-Language-Compiler (ALC) decides to add a @name section, for example to summarize the inline or overload functions, doc-name is the default-name. With _ignore_ the doc-group is used like MyClassC_MyGroup_C_API.

Definition
scopeglobal or function
usage__parser__global__(FUNCTION:doc-name:NAME);
usage__parser__(doc-name=NAME) FUNCTION ...
see alsodoc-group; doc-index; doc-no

Definition at line 2018 of file parser_mk.h.

◆ __parser__doc_no

#define __parser__doc_no   doc-no

Do not write a doc entry into the doxygen documentation …

The doc-no feature is usefull if an internal or hidden function is visible to the public-api but only for testing purpose.

Definition
scopeglobal or function
usage__parser__global__(FUNCTION:doc-no=yes);
usage__parser__(doc-no) FUNCTION ...
see alsodoc-group; doc-index
Example
disable documentation for test-function
__parser__global__(hide-rx=^MkSys);
....
__parser__(keep,doc-no)
MK_OBJ const fmtobj,
MK_I32 * pid_out
);
MkErrorE
collection for the different error-codes …
#define __parser__global__(...)
parser: apply an attribute to a dunction in global scope …
signed int MK_I32
4 byte integer data-type
MK_EXTERN enum MkErrorE MkSysGetPid(MK_OBJ const fmtobj, MK_I32 *pid_out)
getpid syscall with libmkkernel error plugin
object header …

Definition at line 2043 of file parser_mk.h.

◆ __parser__doc_sort

#define __parser__doc_sort   doc-sort=DICTIONARY

dictionary doc-sort of the function in the documantation…

All function belonging to a group ar sorted regarding the doc-sort. If the doc-sort is not set then an order is created. by default the character-set-sort-order (TCL: lsort -ascii) is used.

Definition
usage__parser__global__(doc-sort=DICTIONARY);
example__parser__global__(doc-sort=ils-2);
see alsodoc-group; doc-index

Definition at line 2120 of file parser_mk.h.

◆ __parser__global__doc_db

#define __parser__global__doc_db   doc-db=DIRECTORY

Set directory for external documentation lookup…

This attribute is only used if a native library without PLMK (Programming-Language-Micro-Kernel)-Support is used as input and the native documentation-format can not be used by doxygen.

The external-documentation of a native-library is using usually an other documentation-format as doxygen.
A documentation-preprocessor have to be written for any external documentation and is required to transfer the external-documentation into a format readable by doxygen.
Finally the external-documentation put into the doc-db database and a All-Language-Compiler (ALC) tool like c_NativeDoc.tcl is used to build the final doxygen documentation.

  • For libconfig the the tool libconfig_2_docdb.tcl is part of the LibLcConfig package.
  • For libsqlite3 the the tool libsqlite3_2_docdb.tcl is part of the LibSq3Lite package.

The format of the documentation-database is easy, a directory with a file for every documentation item.

Definition
usage__parser__global__(doc-db=DIRECTORY);
example__parser__global__(doc-db=doc_db.dir);
see alsoMkKernel_Parser_Doc_C_API
Example
LibLcConfig - the documentation directory with file listing
// library header and parser input
__parser__global__(doc-db=doc_db.dir);
// the "doc-db" directory
doc_db.dir
// the toplevel documentation item (doxygen: /section)
doc_db.dir/chapter-list
doc_db.dir/chapter-The C API-section-list
doc_db.dir/chapter-The C API-func-list
doc_db.dir/chapter-The C API
...
// the "section" is below the "chapter" (doxygen: /subsection)
doc_db.dir/section-Why Another Configuration File Library?
...
// the "func" and the "section" define the "chapter" (doxygen: /func)
doc_db.dir/func-ConfigWriteFile
...

Definition at line 2107 of file parser_mk.h.

◆ __parser__global__doc_force

#define __parser__global__doc_force   doc-force@LIST=CLASS_or_PACKAGE@INDEX@?local?

Force the doyygen-index to be build even if no function is available …

The __parser__(doc-index=MyDocIndex); will ONLY be build if a function is available. If the build should always be done use the __parser__global__(doc-force=MyClass@MyDocIndex); global option. If the optional third option is the string local than a local-reference will be used as source of documentation like ${class}_${doc(R)}_${lng}_API rather than ${class}_${doc(R)}_C_API. A local-reference is usefull if the Target-Programming-Language (TPL) language documentation differ.

Definition
usage__parser__global__(doc-force=CLASS_or_PACKAGE@INDEX@?local?);
example__parser__global__(doc-force=MqMsgque@Item);
see alsodoc-group; doc-index

Definition at line 2059 of file parser_mk.h.