92 |
92 |
93 def GetSection(self, section): |
93 def GetSection(self, section): |
94 return self.PreSectionsTexts.get(section, "") + "\n" + \ |
94 return self.PreSectionsTexts.get(section, "") + "\n" + \ |
95 getattr(self.CodeFile, section).getanyText() + "\n" + \ |
95 getattr(self.CodeFile, section).getanyText() + "\n" + \ |
96 self.PostSectionsTexts.get(section, "") |
96 self.PostSectionsTexts.get(section, "") |
|
97 |
|
98 def CTNGlobalInstances(self): |
|
99 variables = self.CodeFileVariables(self.CodeFile) |
|
100 ret = [(variable.getname(), |
|
101 variable.gettype(), |
|
102 variable.getinitial()) |
|
103 for variable in variables] |
|
104 ret.extend([("On"+variable.getname()+"Change", "python_poll", "") |
|
105 for variable in variables |
|
106 if variable.getonchange()]) |
|
107 return ret |
97 |
108 |
98 def CTNGenerate_C(self, buildpath, locations): |
109 def CTNGenerate_C(self, buildpath, locations): |
99 # location string for that CTN |
110 # location string for that CTN |
100 location_str = "_".join(map(str, self.GetCurrentLocation())) |
111 location_str = "_".join(map(str, self.GetCurrentLocation())) |
101 configname = self.GetCTRoot().GetProjectConfigNames()[0] |
112 configname = self.GetCTRoot().GetProjectConfigNames()[0] |