source: vendor/python/2.5/Mac/Modules/ibcarbon/IBCarbonscan.py

Last change on this file was 3225, checked in by bird, 19 years ago

Python 2.5

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