Home | Trees | Indices | Help |
|
---|
|
1 # -*- coding: utf-8 -*- 2 # 3 # Copyright (C) 2009 Rene Liebscher 4 # 5 # This program is free software; you can redistribute it and/or modify it under 6 # the terms of the GNU Lesser General Public License as published by the Free 7 # Software Foundation; either version 3 of the License, or (at your option) any 8 # later version. 9 # 10 # This program is distributed in the hope that it will be useful, but WITHOUT 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 12 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 13 # details. 14 # 15 # You should have received a copy of the GNU Lesser General Public License 16 # along with this program; if not, see <http://www.gnu.org/licenses/>. 17 # 18 19 """Generates description of structure in dot format""" 20 21 __revision__ = "$Id: dot.py,v 1.7 2010-01-21 20:54:44 rliebscher Exp $" 22 23 # stores handler of different object types 24 _registered_handler = {} 2527 _registered_handler[class_] = handler28 2931 """Print object obj into output stream out""" 32 for class_ in type(obj).mro(): 33 if class_ in _registered_handler.keys(): 34 handler = _registered_handler[class_] 35 return handler(obj,out,system,parentname) 36 return ""3739 """Print all variables""" 40 for name,variable in system.variables.items(): 41 print_dot(variable,out,system,name)4244 """Print all rules""" 45 for name,rule in system.rules.items(): 46 print_dot(rule,out,system,name)4749 """Print whole system into one graph""" 50 print_header(out) 51 #printVariablesDot(system,out) 52 printRulesDot(system,out) 53 print_footer(out)54 58 62 63 # import handlers for object types 64 import fuzzy.doc.structure.dot.handlers #@UnusedImport 65
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Apr 5 22:26:12 2013 | http://epydoc.sourceforge.net |