Пример #1
0
    def get_graph( self ):
        title = self.suite + ' runtime namespace inheritance graph'
        graph = CGraphPlain( title )
        graph.graph_attr['rankdir'] = self.orientation
        for ns in self.inherit:
            for p in self.inherit[ns]:
                attr = {}
                attr['color'] = 'royalblue'
                graph.add_edge( p, ns, **attr )
                nl = graph.get_node( p )
                nr = graph.get_node( ns )
                for n in nl, nr:
                    n.attr['shape'] = 'box'
                    n.attr['style'] = 'filled'
                    n.attr['fillcolor'] = 'powderblue'
                    n.attr['color'] = 'royalblue'
 
        self.set_dotcode( graph.string() )
        self.graph = graph
Пример #2
0
    def get_graph( self ):
        title = self.suite + ' runtime namespace inheritance graph'
        graph = CGraphPlain( title )
        graph.graph_attr['rankdir'] = self.orientation
        for ns in self.inherit:
            for p in self.inherit[ns]:
                attr = {}
                attr['color'] = 'royalblue'
                graph.add_edge( p, ns, **attr )
                nl = graph.get_node( p )
                nr = graph.get_node( ns )
                for n in nl, nr:
                    n.attr['shape'] = 'box'
                    n.attr['style'] = 'filled'
                    n.attr['fillcolor'] = 'powderblue'
                    n.attr['color'] = 'royalblue'
 
        self.set_dotcode( graph.string() )
        if self.outfile and not self.disable_output_image:
            try:
                graph.draw( self.outfile, prog='dot' )
            except IOError, x:
                print >> sys.stderr, x
                self.disable_output_image = True
Пример #3
0
    def get_graph( self ):
        title = self.suite + ': runtime inheritance graph'
        graph = CGraphPlain( title )
        graph.graph_attr['rankdir'] = self.orientation
        for ns in self.inherit:
            for p in self.inherit[ns]:
                attr = {}
                attr['color'] = 'royalblue'
                graph.add_edge( p, ns, **attr )
                nl = graph.get_node( p )
                nr = graph.get_node( ns )
                for n in nl, nr:
                    n.attr['shape'] = 'box'
                    n.attr['style'] = 'filled'
                    n.attr['fillcolor'] = 'powderblue'
                    n.attr['color'] = 'royalblue'

        self.set_dotcode( graph.string() )
        self.graph = graph