| 1 | n/a | # IBCarbonscan.py |
|---|
| 2 | n/a | |
|---|
| 3 | n/a | import sys |
|---|
| 4 | n/a | |
|---|
| 5 | n/a | from bgenlocations import TOOLBOXDIR, BGENDIR |
|---|
| 6 | n/a | sys.path.append(BGENDIR) |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | from scantools import Scanner_OSX |
|---|
| 9 | n/a | |
|---|
| 10 | n/a | def main(): |
|---|
| 11 | n/a | print "---Scanning IBCarbonRuntime.h---" |
|---|
| 12 | n/a | input = ["IBCarbonRuntime.h"] |
|---|
| 13 | n/a | output = "IBCarbongen.py" |
|---|
| 14 | n/a | defsoutput = TOOLBOXDIR + "IBCarbonRuntime.py" |
|---|
| 15 | n/a | scanner = IBCarbon_Scanner(input, output, defsoutput) |
|---|
| 16 | n/a | scanner.scan() |
|---|
| 17 | n/a | scanner.close() |
|---|
| 18 | n/a | print "=== Testing definitions output code ===" |
|---|
| 19 | n/a | execfile(defsoutput, {}, {}) |
|---|
| 20 | n/a | print "--done scanning, importing--" |
|---|
| 21 | n/a | import IBCarbonsupport |
|---|
| 22 | n/a | print "done" |
|---|
| 23 | n/a | |
|---|
| 24 | n/a | class IBCarbon_Scanner(Scanner_OSX): |
|---|
| 25 | n/a | |
|---|
| 26 | n/a | def destination(self, type, name, arglist): |
|---|
| 27 | n/a | classname = "IBCarbonFunction" |
|---|
| 28 | n/a | listname = "functions" |
|---|
| 29 | n/a | if arglist: |
|---|
| 30 | n/a | t, n, m = arglist[0] |
|---|
| 31 | n/a | if t == "IBNibRef" and m == "InMode": |
|---|
| 32 | n/a | classname = "IBCarbonMethod" |
|---|
| 33 | n/a | listname = "methods" |
|---|
| 34 | n/a | return classname, listname |
|---|
| 35 | n/a | |
|---|
| 36 | n/a | def makeblacklistnames(self): |
|---|
| 37 | n/a | return [ |
|---|
| 38 | n/a | "DisposeNibReference", # taken care of by destructor |
|---|
| 39 | n/a | "CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first |
|---|
| 40 | n/a | ] |
|---|
| 41 | n/a | |
|---|
| 42 | n/a | def makerepairinstructions(self): |
|---|
| 43 | n/a | return [] |
|---|
| 44 | n/a | |
|---|
| 45 | n/a | |
|---|
| 46 | n/a | if __name__ == "__main__": |
|---|
| 47 | n/a | main() |
|---|