ó 6šâWc@sĒddlmZddlmZddlmZddlmZddlmZddlTddlTddlZddl Z ddl Z defd „ƒYZ dS( iĸĸĸĸ(tExporter(t ClassExporter(tFunctionExporter(t EnumExporter(t VarExporter(t*NtHeaderExportercBsPeZdZdd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS( s2Exports all declarations found in the given headercCstj|||ƒdS(N(Rt__init__(tselftinfot parser_tail((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyRscCsdS(N((Rtcodeunit((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyt WriteIncludescCs |jdƒS(sOReturns true if the given name looks like a internal compiler structuret_(t startswith(Rtname((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pytIsInternalNamescCs{tjj|jƒ}x_|jD]T}tjj|jdƒ}||kr|j|jƒ r|j |||ƒqqWdS(Ni( tostpathtnormpatht parser_headert declarationstabspathtlocationRRtHandleDeclaration(RR texported_namestheadertdeclR((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pytExport%s cCs`itt6tt6tt6tt6}|jt |ƒƒ}|dk r\|j ||||ƒndS(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( RtClassRt EnumerationRtFunctionRtVariabletgetttypetNonetHandleExporter(RRR Rtdispatch_tabletexporter_class((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyR/s  cCsŧ|js·|j|j}|jƒ|_|jj|_||ƒ}|j|jƒ|j|jƒt |t j ƒr‘|j |j |j ƒƒn|j |j ƒƒ|j||ƒndS(N(t incompleteR RtFullNametincludetSetDeclarationsRtSetParsedHeaderRt isinstancetMultipleCodeUnitt SetCurrenttinterface_filetNamet GenerateCode(RRt exporter_typeR RR texporter((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyR$@s  cCs |jjS(N(R R)(R((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyR0PsN( t__name__t __module__t__doc__R#RR RRRR$R0(((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyRs     ( RRRRRtinfosRtos.pathRt exportersR-R(((s8/usr/lib/python2.7/dist-packages/Pyste/HeaderExporter.pyts