pyfcstm.model.base

Module for defining exportable interfaces for AST and PlantUML formats.

This module provides abstract base classes that define interfaces for objects that can be exported to Abstract Syntax Tree (AST) nodes or PlantUML diagram representations.

AstExportable

class pyfcstm.model.base.AstExportable[source]

Abstract base class for objects that can be exported to AST nodes.

Classes that inherit from this interface should implement the to_ast_node method to convert themselves into appropriate AST node representations.

Raises:

NotImplementedError – If the subclass does not implement the to_ast_node method.

to_ast_node() ASTNode[source]

Convert the object to an AST node representation.

Returns:

An AST node representing this object

Return type:

dsl_nodes.ASTNode

Raises:

NotImplementedError – This is an abstract method that must be implemented by subclasses

PlantUMLExportable

class pyfcstm.model.base.PlantUMLExportable[source]

Abstract base class for objects that can be exported to PlantUML format.

Classes that inherit from this interface should implement the to_plantuml method to convert themselves into PlantUML diagram syntax.

Raises:

NotImplementedError – If the subclass does not implement the to_plantuml method.

to_plantuml() str[source]

Convert the object to a PlantUML diagram representation.

Returns:

A string containing PlantUML syntax representing this object

Return type:

str

Raises:

NotImplementedError – This is an abstract method that must be implemented by subclasses