-
g=c       s     d  Z     h  d d <d d <d d <d d <d	 d
 <d d <d d <d d <Z 1 y 2 e d i d  d Z Wn 3 4 d Z n X9 d k Z > d k Z ? d k l Z A d k TG d e f d     YZ	 d S(   s/   Base class for information gathering classes.

s   $RCSfile: suite.py,v $s   module_names:   $Id: suite.py,v 1.2 2002/08/24 19:55:40 doughellmann Exp $s   rcs_ids    Doug Hellmann <doug@hellfly.net>s   creators   UNSPECIFIEDs   projects   Sun, 11-Nov-2001 10:45:58 ESTs   createds   $Author: doughellmann $s   authors   $Revision: 1.2 $s   versions   $Date: 2002/08/24 19:55:40 $s   dates    i   s   0.0N(   s   HappyDOM(   s   *s   SuiteInfoBasec      s   G d  Z  O R e Z T h  h  d  Z y d   Z  d   Z  d   Z  d   Z  e i	 d  Z
  d   Z  d   Z  d	   Z  d
   Z RS(   sO  Base class for information gathering classes.

    Default implementation assumes that the user is interested
    in learning about functions and classes defined within the
    parse tree used for initialization.  This makes implementation
    of MethodInfo easy.  Other derived classes add behavior to
    find other information.
    c 	   s   T g h h  |  _ i h  |  _ j |  i |  i f } k t i |  | | | |  m | |  _
 n h  |  _ o |  i i |  p |  i   r |  i   } t | i | d  |  _ u | o v |  i |  n w d Sd S(   s  Initialize the info extractor.

        Parameters:

            name -- name of this object
        
            parent -- parent object (e.g. Module for Class)

            filename -- file which contains the tree
            
            tree -- parse tree from which to extract information

            commentInfo -- comments extracted from source file where
            this object was found
            
        s    N(   s   selfs   _class_infos   _function_infos
   namespacess   HappyDOMs   __init__s   names   parents   filenames   commentInfos   _comment_infos   _configuration_valuess   updates   defaultConfigValuess   _extractConfigurationValuess   getCommentKeys   comment_keys   gets	   _commentss   trees   _extractInfo(	   s   selfs   names   parents   filenames   trees   commentInfos   defaultConfigValuess   comment_keys
   namespaces(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   __init__T s   
c    s?   y z |  i o { |  i i   |  i f Sn } |  i f Sd  S(   N(   s   selfs   _parents   getCommentKeys   _name(   s   self(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   getCommentKeyy s   c    sz      t  }  |  i o3  y  |  i i   } Wn   t  } n Xn  | t  j o  |  i } n  | Sd S(   s@   Return any HappyDoc configuration values related to this object.N(   s   Nones   valuess   selfs   _parents   getConfigurationValuess   _configuration_values(   s   selfs   values(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   getConfigurationValues s   	c 	   s     d k  l }  d k l }  t |  d j o$  t t d | d  \ } } n  t t | d  \ } }  | o  t
 | d  |  _ n  d |  _  x | d D ] }  t t |  \ } }  | o  | d }  | d	 t i j oC  | d d }  | d
 |  d |   d |  i  |  i | <n[  | d	 t i j oC  | d d }  | d
 |  d |   d |  i  |  i | <n n q W d Sd S(   s'   Pull information out of the parse tree.(   s	   ClassInfo(   s   FunctionInfoi   i   i   s	   docstrings    s   compoundi    s   trees   parents   commentInfoN(   s   happydoclib.parseinfo.classinfos	   ClassInfos"   happydoclib.parseinfo.functioninfos   FunctionInfos   lens   trees   matchs   DOCSTRING_STMT_PATTERNs   founds   varss   evals   selfs
   _docstrings   nodes   COMPOUND_STMT_PATTERNs   cstmts   symbols   funcdefs   names   _comment_infos   _function_infos   classdefs   _class_info(	   s   selfs   trees   nodes	   ClassInfos   varss   names   FunctionInfos   cstmts   found(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   _extractInfo s2   $
 	
		%c    s      d Sd S(   s$   Default implementation does nothing.N(    (   s   self(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   _extractConfigurationValues s   s   ^\s*([^\n]+)\nc    s      | i   }  x3  | o | d d d f j o  | d } q W x3  | o | d d d f j o  | d  } qT W |  i i |  }  | o  | i d  i   Sn  | Sd S(   s*   Extract a summary text from a larger body.i    s   "s   'i   iN(   s   texts   strips   selfs   _summary_patterns   searchs   matchObjs   group(   s   selfs   texts   matchObj(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   _extractSummary s    ! !
c    s*      d |  i |  i f }  | Sd S(   s5   Return any __doc__ string value found for the object.s   %s

%sN(   s   selfs
   _docstrings	   _commentss   dstring(   s   selfs   dstring(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   getDocString s   c    s$      |  i   }  | d Sd S(   sN   Returns the docstring converter format name for the docstring for this object.s   docStringFormatN(   s   selfs   getConfigurationValuess   config_values(   s   selfs   config_values(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   getDocStringFormat s   c    sR      |  i t j o  |  i |  i    |  _ n  |  i |  i   f Sd S(   ss   Return a summary of the __doc__ string for this object and the docstring converter name for the format of the text.N(   s   selfs   _docstring_summarys   Nones   _extractSummarys   getDocStrings   getDocStringFormat(   s   self(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   getSummaryAndFormat s   (   s   __doc__s   Nones   _docstring_summarys   __init__s   getCommentKeys   getConfigurationValuess   _extractInfos   _extractConfigurationValuess   res   compiles   _summary_patterns   _extractSummarys   getDocStrings   getDocStringFormats   getSummaryAndFormat(    (    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   SuiteInfoBaseG s   		%
$(
   s   __doc__s   __rcs_info__s   splits   __version__s   res   happydoclibs   happydoclib.happydoms   HappyDOMs   happydoclib.parseinfo.utilss   SuiteInfoBase(   s   res   SuiteInfoBases   HappyDOMs   __version__s   happydoclibs   __rcs_info__(    (    sY   /home/dhellmann/Personal/Devel/HappyDoc/dist/HappyDoc-r2_1/happydoclib/parseinfo/suite.pys   ? s   Q
