functionlist
Lists the contents of the given class, or all loaded classes.
Information
Pretty-prints a class definition.Syntax
list(Modelica.Math.sin)list(Modelica.Math.sin,interfaceOnly=true)
Description
list() pretty-prints the whole of the loaded AST while list(className) lists a class and its children.
It keeps all annotations and comments intact but strips out any comments and normalizes white-space.
list(className,interfaceOnly=true) works on functions and pretty-prints only the interface parts
(annotations and protected sections removed). String-comments on public variables are kept.
If the specified class does not exist (or is not a function when interfaceOnly is given), an empty string is returned.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| TypeName | class_ | $Code(AllLoadedClasses) | |
| Boolean | interfaceOnly | false | |
| Boolean | shortOnly | false | only short class definitions |
| ExportKind | exportKind | ExportKind.Absyn |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| String | contents |
Revisions
| Revision | Author | Comment |
|---|---|---|
| 16124 | sjoelund.se | Added replaced exportAsCode option with exportKind (selecting which kind of unparsing to use) |
| 10796 | sjoelund.se | Added shortOnly option |
| 10756 | sjoelund.se | Added interfaceOnly option |