Exemplo n.º 1
0
    def __init__(self, members = [], name = None, prefix = 'node') :
        if not name : name = GenNodeName(prefix)
        GraphObject.__init__(self, name)

        self.Members = set()
        for member in members :
            self.AddMember(member)
Exemplo n.º 2
0
    def __init__(self, snode, enode, name = None) :
        if not name : name = GenEdgeName(snode, enode)
        GraphObject.__init__(self, name)

        self.StartNode = snode
        self.EndNode = enode

        snode.AddOutputEdge(self)
        enode.AddInputEdge(self)
Exemplo n.º 3
0
    def __init__(self, snode, enode, name=None):
        if not name: name = GenEdgeName(snode, enode)
        GraphObject.__init__(self, name)

        self.StartNode = snode
        self.EndNode = enode

        snode.AddOutputEdge(self)
        enode.AddInputEdge(self)
Exemplo n.º 4
0
    def Dump(self):
        result = GraphObject.Dump(self)

        result['StartNode'] = self.StartNode.Name
        result['EndNode'] = self.EndNode.Name

        return result
Exemplo n.º 5
0
    def Dump(self) :
        result = GraphObject.Dump(self)

        result['Members'] = []
        for member in self.Members :
            result['Members'].append(member.Name)

        return result