1 import paraview, os, sys
9 from libvtkPVServerCommonPython import *
10 from libvtkPVServerManagerPython import *
12 from vtkPVServerCommonPython import *
13 from vtkPVServerManagerPython import *
17 if a.startswith("vtk") and (len(a) > 3):
18 classeslistsm.append(a)
20 from paraview.vtk import *
24 if (a not in l1) and a.startswith("vtk"):
25 classeslistvtk.append(a)
28 pv_classes_new=classeslistsm
29 while len(pv_classes_new):
30 pv_classes_cur=pv_classes_new
32 for c in pv_classes_cur:
33 filename=sys.argv[1]+"/"+c+".h"
34 if os.path.isfile(filename):
38 if re.match('\s*/',line) is None:
39 if re.match('\s*public\s*:',line):
42 m=re.match('\s*class\s+(vtk\w+)\s*;',line)
45 if cn not in dic.keys() and cn not in pv_classes_new and cn in classeslistvtk:
46 pv_classes_new.append(cn)
49 m=re.match('\s*struct\s+(vtk\w+)\s*;',line)
52 if cn not in dic.keys() and cn not in pv_classes_new and cn in classeslistvtk:
53 pv_classes_new.append(cn)
56 m=re.match('\s*#include\s+"(vtk\w+)\.h"',line)
59 if cn not in dic.keys() and cn not in pv_classes_new and cn in classeslistvtk:
60 pv_classes_new.append(cn)
63 cm=re.findall('public\s+(vtk\w+)',line)
67 if cn not in dic.keys() and cn not in pv_classes_new:
68 pv_classes_new.append(cn)
79 if len(dic[c][1]) and dic[c][0] == 0:
80 ret+=collect_dic(dic[c][1])
86 pv_classes_sort=collect_dic(dic.keys())
89 if(os.path.exists('wrapfiles.txt')):
90 wf_txt=open('wrapfiles.txt','r')
91 strs=wf_txt.readlines()
97 for c in pv_classes_sort:
104 wf_txt=open('wrapfiles.txt','w')