From 29518a75912f4dd75a912b30abd3434ab15e4b96 Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Tue, 5 Nov 2019 09:58:02 -0500 Subject: [PATCH] render Boundary.inBoundary in the DFD (#13) --- pytm/pytm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pytm/pytm.py b/pytm/pytm.py index c8fb402..2da707d 100644 --- a/pytm/pytm.py +++ b/pytm/pytm.py @@ -515,16 +515,20 @@ def dfd(self): class Boundary(Element): def __init__(self, name): super().__init__(name) + self._is_drawn = False if name not in TM._BagOfBoundaries: TM._BagOfBoundaries.append(self) def dfd(self): + self._is_drawn = True print("subgraph cluster_{0} {{\n\tgraph [\n\t\tfontsize = 10;\n\t\tfontcolor = firebrick2;\n\t\tstyle = dashed;\n\t\tcolor = firebrick2;\n\t\tlabel = <{1}>;\n\t]\n".format(_uniq_name(self.name), self.name)) result = get_args() _debug(result, "Now drawing boundary " + self.name) for e in TM._BagOfElements: if type(e) == Boundary: - continue # Boundaries are not in boundaries + if not e._is_drawn: + _debug(result, "Now drawing boundary " + e.name) + e.dfd() if e.inBoundary == self: result = get_args() _debug(result, "Now drawing content " + e.name)