This commit is contained in:
Михаил Капелько
2023-12-28 18:19:44 +03:00
parent 480fc7d132
commit 56c897bb9e
3 changed files with 34 additions and 7 deletions

View File

@@ -1,8 +1,11 @@
from generation.shortenName import *
from generation.pipeBusSource import *
from generation.pipeFormat import *
from generation.pipeSource import *
def sectionGeneratedPipes(entity, sub, c):
fmtBusPipe = c.readFile(f"{c.dir}/templates/section-generated-bus-pipe")
fmtBusPipeToggle = c.readFile(f"{c.dir}/templates/section-generated-bus-pipe-toggle")
fmtExRecent = c.readFile(f"{c.dir}/templates/section-generated-pipe-ex-recent")
fmtRecent = c.readFile(f"{c.dir}/templates/section-generated-pipe-recent")
fmtSet = c.readFile(f"{c.dir}/templates/section-generated-pipe-set")
@@ -26,7 +29,10 @@ def sectionGeneratedPipes(entity, sub, c):
shortSrc = shortenName(key)
# SRC.
src = pipeSource(key, entity, c.structure)
src = pipeSource(key, entity)
# Bus.
if src.startswith("K."):
src = pipeBusSource(key, c.structure, fmtBusPipe, fmtBusPipeToggle)
fmtPipe = pipeFormat(fmtExRecent, fmtRecent, fmtSet, fmtToggle, fmtToggleNil, key, entity)
for fmt in fmtPipe: