symbian-qemu-0.9.1-12/python-2.6.1/Mac/Modules/ibcarbon/IBCarbonscan.py
author William Roberts <williamr@symbian.org>
Wed, 07 Jul 2010 22:30:23 +0100
branchGCC_SURGE
changeset 88 3c15ef939dd3
parent 1 2fb8b9db1c86
permissions -rw-r--r--
Revised fix for Bug 3162 - can't use #ifdef GCCE in ROM building files, so just comment out the line for now

# IBCarbonscan.py

import sys

from bgenlocations import TOOLBOXDIR, BGENDIR
sys.path.append(BGENDIR)

from scantools import Scanner_OSX

def main():
    print "---Scanning IBCarbonRuntime.h---"
    input = ["IBCarbonRuntime.h"]
    output = "IBCarbongen.py"
    defsoutput = TOOLBOXDIR + "IBCarbonRuntime.py"
    scanner = IBCarbon_Scanner(input, output, defsoutput)
    scanner.scan()
    scanner.close()
    print "=== Testing definitions output code ==="
    execfile(defsoutput, {}, {})
    print "--done scanning, importing--"
    import IBCarbonsupport
    print "done"

class IBCarbon_Scanner(Scanner_OSX):

    def destination(self, type, name, arglist):
        classname = "IBCarbonFunction"
        listname = "functions"
        if arglist:
            t, n, m = arglist[0]
            if t == "IBNibRef" and m == "InMode":
                classname = "IBCarbonMethod"
                listname = "methods"
        return classname, listname

    def makeblacklistnames(self):
        return [
                "DisposeNibReference",                          # taken care of by destructor
                "CreateNibReferenceWithCFBundle",  ## need to wrap CFBundle.h properly first
                ]

    def makerepairinstructions(self):
        return []


if __name__ == "__main__":
    main()