Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render Boundary.inBoundary in the DFD #52

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pytm/pytm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <<i>{1}</i>>;\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)
Expand Down