-í
YM=c       s    d  Z  I K h  d d <d d <d d <d d <d	 d
 <d d <d d <d d <Z [ y \ e d i d ƒ d Z Wn ] ^ d Z n Xc d k Z d y e d k l Z Wn f g d k l Z n Xl d k Z r d „  Z	 } d e i
 i f d „  ƒ  YZ d S(   sÝ  Documentation set which writes output in dia format.

  Some known bugs/deficiencies

    - you can NOT specify an output filename yet, it is fixed to
    'dia.dia' (quite easy to solve, I just haven't had the time). The
    dia file is not yet compressed, but it can be used without changes
    in dia. If you save the file from within dia, it will be saved in
    gzipped format (without .gz).
  
    - in some cases, the generalization arrows are not actually
    connected to the class, but sometimes they will 'snap' to the
    right class when you move the class box on the screen. This
    appears only (I think) if the name of the class in the dia class
    font (which is a proportional font) is longer than the longest
    method-name (which is displayed in a non proportional font).  At
    the moment I compute the size of the boxes only by calculating the
    width of the string for the longest method name. I have no idea
    how to get the length of the class name string :( ( I can work
    around this one, if I connected the arrows to the left side of the
    boxes instead of the middle, but I like it better that way.)
  
    - If a base class is not included in the directories the dia file
    is produced from, a message will be issues 'base_class <...> not
    found' and a dummy UML object is created (with just one __init__
    method).
  
    - The Layout is of course not really good (esp. for automatically
    generated base classes, since they will be put in the same 'line'
    as the class where it is needed)
  
    - No package support right now.  Just a matter of time ;-)
  
    - I assume that each class name is unique. If you have several
    classes with the same name, one of the classes will have all the
    generalizations arrows!

  To Do

    - update an existing dia file if you change the python code
    (e.g. just adding the new methods).
  
    - automatically generate python code for an UML diagram?
    
    - add attributes as well (matter of the parser)

s   $RCSfile: docset_Dia.py,v $s   module_names!   Joerg Henrichs <jhenrichs@gmx.de>s   creators   HappyDocs   projects   Sun, 26-Mar-2000 11:19:54 ESTs   createds   $Author: doughellmann $s   authors   $Revision: 1.2 $s   versions   $Date: 2002/08/04 12:04:41 $s   dates   $Locker:  $s   lockers    i   s   0.0N(   s   StringIOc      s#   r s t h  d d <t  d <Sd S(   s4   Return info about this module to the dynamic loader.s   Dias   names   factoryN(   s	   DiaDocSet(    (    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys
   entryPointr s   s	   DiaDocSetc      st   } d  Z  „ † d h  d „ Z ” d „  Z ª d „  Z µ d „  Z Ý d „  Z î d „  Z d „  Z d	 „  Z RS(
   sƒ   Documentation set written in dia format.

    Parameters

      *Adds no additional parameters not understood by DocSet.*
    
    i    c    se   † Š h  } ‹ | i | ƒ Œ | | d < t t i i i Ž |  | | | | f ‘ | ƒ ’ d  Sd  S(   Ns   usePackages(   s
   extra_argss   updates   extraNamedParameterss   usePackagess   applys   happydoclibs   happydocsets   DocSets   __init__s   selfs   formatterFactorys
   parserFuncs   defaultParserConfigValuess   inputModuleNames(   s   selfs   formatterFactorys
   parserFuncs   inputModuleNamess   usePackagess   defaultParserConfigValuess   extraNamedParameterss
   extra_args(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   __init__† s   	
c    s~   ” • – |  i d ƒ š |  i t ƒ |  _ › |  i |  i |  i d ƒ |  _   |  i ƒ  ¡ |  i	 ƒ  ¥ |  i
 ƒ  ¦ d Sd S(   s*   Write the documentation set to the output.s   Beginning to write...s    N(   s   selfs   statusMessages   getFullOutputNameForObjects   Nones
   _root_names
   openOutputs   _titles   _outputs   _writePackagess   _writeModuless   close(   s   self(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   write” s   !c    sw   ª « ¬ |  i ƒ  ­ |  i d ƒ ® |  i i ƒ  } ¯ | i ƒ  ° x$ | D° ] \ } } ± | i ƒ  qL W² d Sd S(   s&   Output documentation for all packages.s    Writing package documentation...N(	   s   selfs   statusMessages   _all_packagess   itemss   package_itemss   sorts   package_names   packages   _write(   s   selfs   package_itemss   package_names   package(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   _writePackagesª s   
 c 	   ss  µ º t  i  | ƒ } » t  i | ƒ } ¼ | i ƒ  ¾ d g } ¿ xû ¿ | o | oé Â g  } Ã xK | DÃ ]@ } Ä | | o+ Å |  i
 | | | ƒ Æ | i | ƒ n qj WÇ |  i i ƒ  Ê xu | DÊ ]j } Ë xN | i ƒ  DË ]= } Ì y Í | | i | ƒ Wn Î t j
 o
 Ï n Xqä WÕ | i | ƒ qË WqF WÙ x( | DÙ ] } Ú |  i
 | | | ƒ qKWd  S(   Ni   (   s   copys   classess   ls   deepcopys   class2basess   c2bs   sorts   writtens   cs   selfs   _writeClasss   class2modules   appends
   _formatters   NewLines   keyss   c1s   removes
   ValueError(	   s   selfs   classess   class2basess   class2modules   cs   writtens   ls   c2bs   c1(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   _writeAllClassesµ s2    	
 	
 	 	
 	c    sÈ   Ý Þ ß |  i ƒ  à |  i d ƒ á |  i ƒ  \ } } } ã |  i i |  i ƒ å |  i	 | | | ƒ ç |  i d ƒ è x* |  i
 i ƒ  Dè ] } é |  i | ƒ qŠ Wê |  i i |  i ƒ ë d Sd S(   s%   Output documentation for all modules.s   Writing all classes ...s   Writing Generalization ...N(   s   selfs   statusMessages   _GetAllClassesInformations   classess   class2basess   class2modules
   _formatters   BeginObjectSections   _outputs   _writeAllClassess   _all_moduless   keyss   module_names   _writeModuleConnectionss   EndObjectSection(   s   selfs   module_names   classess   class2modules   class2bases(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   _writeModulesÝ s    	c 
   sê   î ô õ |  i i ƒ  } ö g  } ÷ h  } ø h  } ù x | Dù ]’ } ú |  i | }	 û |  i	 |	 i
 ƒ  ƒ } ü | o ý | | } n þ xC | Dþ ]8 } ÿ |	 | | < |	 i | ƒ } | i ƒ  | | <q“ Wq= W| | | f Sd S(   sG  Returns a tuple (classes,class2bases, class2module), where
        classes is a list of all classes to write,
        class2bases is a dictionary containing for each class
        the list of all direct subclasses and
        class2module is a dictionary containing for each class the
        module to which this class belongsN(   s   selfs   _all_moduless   keyss   module_namess   classess   class2basess   class2modules
   moduleNames   modules   _filterNamess   getClassNamess   ls   cs   getClassInfos   bs   getBaseClassNames(
   s   selfs   class2modules   classess
   moduleNames   cs   module_namess   class2basess   bs   ls   module(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   _GetAllClassesInformationî s"   			
 	

 	c    sŒ   	| i | ƒ } 
|  i | i ƒ  ƒ } t d „  | ƒ } | o | i
 ƒ  n |  i i | d | d |  i ƒd S(   s<   Output the documentation for the class in the parent object.c    s   |  t t f S(   N(   s   xs   None(   s   x(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   <lambda>s    s   methodss   outputN(   s   parents   getClassInfos
   class_names
   class_infos   selfs   _filterNamess   getMethodNamess   method_namess   maps   methods_types_parameterss   sorts
   _formatters   WriteObjects   _output(   s   selfs   parents
   class_names   methods_types_parameterss
   class_infos   method_names(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   _writeClasss   
	c 	   sÂ   |  i | } |  i } |  i | i ƒ  ƒ }  | o !d Sn "xh | D"]] } #| i
 | ƒ } $| i ƒ  } %x0 | D%]% } &|  i i | | '|  i ƒ qŽ WqZ Wd S(   s.   Output the documentation for the module named.N(   s   selfs   _all_moduless   module_names   modules
   _formatters	   formatters   _filterNamess   getClassNamess   class_namess
   class_names   getClassInfos   cs   getBaseClassNamess   base_classess
   base_classs   writeGeneralizations   _output(	   s   selfs   module_names
   base_classs   cs   modules
   class_names	   formatters   base_classess   class_names(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   _writeModuleConnectionss   
 	
 	(	   s   __doc__s   __init__s   writes   _writePackagess   _writeAllClassess   _writeModuless   _GetAllClassesInformations   _writeClasss   _writeModuleConnections(    (    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys	   DiaDocSet} s   	((   s   __doc__s   __rcs_info__s   splits   __version__s   copys	   cStringIOs   StringIOs   happydoclib.happydocsets   happydoclibs
   entryPoints   happydocsets   DocSets	   DiaDocSet(   s   __version__s
   entryPoints   StringIOs   copys	   DiaDocSets   happydoclibs   __rcs_info__(    (    s[   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/docset/docset_Dia.pys   ?I s   Q