Pragma#

A Pragma object stores a pragma information. It could save graphical information (DiagramPragma) and other data used by tools. The following figure depicts the Pragma classes hierarchy.

../../../_images/pragma.svg

Pragma class diagram#

class ansys.scadeone.core.swan.Pragma(pragma: str)#

Bases: object

Pragma structure.

static filter(pragmas: List[Pragma], key: str, with_key: bool = True) List[Pragma]#

Filters a list of pragmas with/without a given key.

Parameters:
pragmasList[Pragma]

List of pragmas.

keystr

Key to filter.

with_keybool, optional

If True, return pragmas with the given key, otherwise without the key, by default True.

Returns:
List[Pragma]

List of pragmas with the given key.

property diagram: DiagramPragma#

Return the pragma diagram.

property pragma: str#

Return full pragma string.