Ñò
XÁÅGc           @   s&   d  d k  Z d e f d „  ƒ  YZ d S(   iÿÿÿÿNt   Exporterc           B   sž   e  Z d  Z d Z d d „ Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s=   Base class for objects capable to generate boost.python code.t    i   c         C   s(   | |  _  | |  _ d  |  _ g  |  _ d  S(   N(   t   infot   parser_tailt   Nonet   interface_filet   declarations(   t   selfR   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   __init__   s    			c         C   s   t  |  i i ƒ ‚ d  S(   N(   t   NotImplementedErrort	   __class__t   __name__(   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   Name   s    c         C   s   |  i  S(   N(   R   (   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   Tail   s    c         C   sP   | |  _  |  i i } |  i } | i | | ƒ \ } } | |  _ |  i | ƒ d  S(   N(   t   parserR   t   includeR   t   parset   parser_headert   SetDeclarations(   R   R   t   headert   tailR   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   Parse   s    			c         C   s   | |  _  d  S(   N(   R   (   R   t   parsed_header(    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   SetParsedHeader(   s    c         C   s   | |  _  d  S(   N(   R   (   R   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyR   ,   s    c         C   s!   |  i  | ƒ |  i | | ƒ d  S(   N(   t   WriteIncludet   Export(   R   t   codeunitt   exported_names(    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   GenerateCode0   s    c         C   s   | i  d d |  i i ƒ d  S(   NR   s   #include <%s>
(   t   WriteR   R   (   R   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyR   5   s    c         C   s   d S(   s1   subclasses must override this to do the real workN(    (   R   R   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyR   9   s    c         C   sZ   g  } x5 |  i  D]* } | i ƒ  | j o | i | ƒ q q W| p t d | ‚ n | S(   Ns   no %s declaration found!(   R   t   FullNamet   appendt   RuntimeError(   R   t   fullnamet   declst   decl(    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   GetDeclarations>   s    
 c         C   s   |  i  | ƒ } | d S(   Ni    (   R$   (   R   R!   R"   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   GetDeclarationH   s    c         C   s   d |  i  i f S(   s†   Returns a string that uniquely identifies this instance. All
        exporters will be sorted by Order before being exported.
        i    (   R   t   name(   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   OrderN   s    c         C   s
   |  i  i S(   N(   R   R   (   R   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   HeaderU   s    c         C   sB   t  |  ƒ t  | ƒ j o) |  i ƒ  | i ƒ  j o |  i | i j S(   N(   t   typeR   R   (   R   t   other(    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   __eq__Y   s    2c         C   s   |  | j S(   N(    (   R   R*   (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   __ne__]   s    s       N(   R   t
   __module__t   __doc__t   INDENTR   R   R   R   R   R   R   R   R   R   R$   R%   R'   R(   R+   R,   (    (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyR       s"   										
				(   t   os.patht   ost   objectR    (    (    (    s.   /usr/lib/pymodules/python2.6/Pyste/Exporter.pyt   <module>   s   