Download lpdoc Reference Manual - pdf
Transcript
Chapter 14: Low level documentation format definitions 97 (main, component, etc.). ModuleType is how the module is used (use module, etc.). Name is the module/application name. NDName is the same, but without _doc, if applicable. Summary is a brief summary of the contents of the manual (taken from the appropriate comment/2 declaration, if available). Version is the version of the first comment/2 entry which specifies a version number (which should be the current version). Comment is the introductory text for the module (taken from the comment/2 declaration, if available). OS is the output stream to which writes should be made (normally points to the output file). IntroOS is the output stream for the introduction. Usage: format_ intro(Format,FileType,ModuleType,Name,NDName,Summary,Version,Comment,OS,IntroOS) − Description: Formats intro stuff: summary, intro, etc. − The following properties should hold at call time: Format and texinfo unify. (= /2) FileType is any term. (term/1) ModuleType is currently instantiated to an atom. (atom/1) Name is a string (a list of character codes). (string/1) NDName is a string (a list of character codes). (string/1) Summary is a string (a list of character codes). (string/1) Version is a complete version descriptor. (version_descriptor/1) Comment is a string (a list of character codes). (string/1) OS is an open stream. (stream/1) IntroOS is an open stream. (stream/1) format module usage/14: PREDICATE format_module_ usage(Format,Name,Type,Exports,Mults,UMods,IUMods,SMods,EMOds,Ops,NDecls,NModes,Indic This predicate defines the format of the usage info for the module. Format is the type of output (e.g., texinfo, latex, etc.). Name is the name of the module (taken from the module/2 declaration). Exports contains the predicates exported by the module (taken from the module/2 declaration). UMods contains the user modules imported by the module. SMods contains the system modules imported by the module. EMods contains the internal (engine) modules imported by the module. Ops contains any exported operator definitions. NDecls contains any exported new declarations. NModes contains any new mode definitions. Indices is a list of index names (the indices to be generated). OS is the output stream to which writes should be made (normally points to the output file). format predicates begin/4: PREDICATE format_predicates_begin(Format,Name,Text,OS) This predicate defines the format of the first part of the documentation for a set of predicates. Format is the type of output (e.g., texinfo, latex, etc.). Name is the module name. Text describes which set of predicates is being documented (e.g., exported predicates, imported predicates, etc.). OS is the output stream to which writes should be made (normally points to the output file). Usage: format_predicates_begin(Format,Name,Text,OS) − Description: Predicates will formatted as an itemized list. Corresponds to a begin itemize.