Annotations
- Annotations are meta data in a Mosel source file that are stored in the resulting BIM file after compilation; no impact on the model itself (treated like comments); either global or associated with public globally declared objects (including subroutines).
- Single-line annotations start with '!@' and a name; blocks are surrounded by '(!@' and '!)'
- !@doc.descr denotes the annotation marker descr within category doc (predefined category names are mc and doc, user-defined names can also be employed)
(!@doc. Enter category 'doc' (this text is ignored) @ descr This is the value of 'doc.descr' @. Jump back to root (this text is ignored) @mynote Contents of 'mynote' (full name: '.mynote') @.anote Complete form of an annotation in default category !)
- Declaring annotations (via the mc.def compiler annotation): optional; enables the compiler to check the validity of the definitions and reject non-compliant ones
! Defining an alias that redirects onto 2 different annotations: !@mc.def descr alias doc.descr om.descr
- moseldoc tool: generates an XML model documentation that is processed into HTML pages
- Compile source model file with option -D
mosel comp -D mymodel.mos
- Run program moseldoc
moseldoc mymodel Generates HTML and XML moseldoc -o mydir -html mymodel HTML only, specifying output directory moseldoc -f -xml mymodel XML only, forcing output overwrite
- Compile source model file with option -D