blark.solution.TcPOU

class blark.solution.TcPOU(name: 'str', guid: 'str', decl: 'TcDeclImpl', metadata: 'dict[str, str]', filename: 'Optional[pathlib.Path]', parent: 'Optional[TwincatSourceCodeItem]', xml: 'dataclasses.InitVar[lxml.etree.Element | None]' = None, source_type: 'Optional[SourceType]' = None, parts: 'list[POUPart]' = <factory>)[source]

Bases: TcSource

Methods

__init__(name, guid, decl, metadata, ...[, ...])

create_source_child_from_xml(child, parent)

get_child_by_identifier(identifier)

rewrite_code(identifier, contents)

to_blark()

Attributes

default_source_type

file_extension

parts_by_name

source_type

xml

parts

name

guid

decl

metadata

filename

parent

file_extension: ClassVar[str] = '.TcPOU'
parts: list[POUPart]
property parts_by_name: dict[str, TcAction | TcMethod | TcProperty]
get_child_by_identifier(identifier: str) TcAction | TcMethod | TcProperty | TcDeclImpl[source]
rewrite_code(identifier: str, contents: str)[source]
to_blark() list[BlarkCompositeSourceItem | BlarkSourceItem][source]
classmethod create_source_child_from_xml(child: Element, parent: TcSource, filename: Path | None = None) TcAction | TcMethod | TcProperty | TcExtraInfo | TcUnknownXml | None[source]
__init__(name: str, guid: str, decl: TcDeclImpl, metadata: dict[str, str], filename: Optional[pathlib.Path], parent: Optional[TwincatSourceCodeItem], xml: dataclasses.InitVar[lxml.etree.Element | None] = None, source_type: Optional[SourceType] = None, parts: list[POUPart] = <factory>) None