Ņō
XÁÅGc           @   sĒ   d  d k  l  Z  d  d k l Z d  d k l Z d  d k l Z d  d k l Z d  d k Td  d k Td  d k Z d  d k	 Z	 d  d k
 Z
 d e  f d	     YZ d S(
   iĸĸĸĸ(   t   Exporter(   t   ClassExporter(   t   FunctionExporter(   t   EnumExporter(   t   VarExporter(   t   *Nt   HeaderExporterc           B   sP   e  Z d  Z d d  Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   s2   Exports all declarations found in the given headerc         C   s   t  i |  | |  d  S(   N(   R    t   __init__(   t   selft   infot   parser_tail(    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyR      s    c         C   s   d  S(   N(    (   R   t   codeunit(    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyt   WriteInclude   s    c         C   s   | i  d  S(   sO   Returns true if the given name looks like a internal compiler
        structuret   _(   t
   startswith(   R   t   name(    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyt   IsInternalName   s    c         C   s~   t  i i |  i  } xb |  i D]W } t  i i | i d  } | | j o+ |  i | i  o |  i	 | | |  q q Wd  S(   Ni    (
   t   ost   patht   normpatht   parser_headert   declarationst   abspatht   locationR   R   t   HandleDeclaration(   R   R   t   exported_namest   headert   declR   (    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyt   Export%   s    
 !c         C   sb   h t  t 6t t 6t t 6t t 6} | i t	 |   } | d j	 o |  i | | | |  n d S(   sÔ   Dispatch the declaration to the appropriate method, that must create
        a suitable info object for a Exporter, create a Exporter, set its
        declarations and append it to the list of exporters.
        N(   R   t   ClassR   t   EnumerationR   t   FunctionR   t   Variablet   gett   typet   Nonet   HandleExporter(   R   R   R   R   t   dispatch_tablet   exporter_class(    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyR   /   s    
c         C   sŋ   | i  pą |  i | i } | i   | _ |  i i | _ | |  } | i |  i  | i |  i  t	 | t
 i
  o | i |  i | i    n | i | i    | i | |  n d  S(   N(   t
   incompleteR	   R   t   FullNamet   includet   SetDeclarationsR   t   SetParsedHeaderR   t
   isinstancet   MultipleCodeUnitt
   SetCurrentt   interface_filet   Namet   GenerateCode(   R   R   t   exporter_typeR   R   R	   t   exporter(    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyR$   @   s    
c         C   s
   |  i  i S(   N(   R	   R)   (   R   (    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyR0   P   s    N(   t   __name__t
   __module__t   __doc__R#   R   R   R   R   R   R$   R0   (    (    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyR      s   			
		(   R    R   R   R   R   t   infosR   t   os.pathR   t	   exportersR-   R   (    (    (    s4   /usr/lib/pymodules/python2.6/Pyste/HeaderExporter.pyt   <module>   s   

