Пример #1
0
 def SetDeclarations(self, declarations):
     Exporter.SetDeclarations(self, declarations)
     decl = self.GetDeclaration(self.info.name)
     if isinstance(decl, Typedef):
         self.class_ = self.GetDeclaration(decl.type.name)
         if not self.info.rename:
             self.info.rename = decl.name
     else:
         self.class_ = decl
     self.public_members = \
         [x for x in self.class_.members if x.visibility == Scope.public]
Пример #2
0
 def SetDeclarations(self, declarations):
     Exporter.SetDeclarations(self, declarations)
     if self.declarations:
         decl = self.GetDeclaration(self.info.name)
         if isinstance(decl, Typedef):
             self.class_ = self.GetDeclaration(decl.type.name)
             if not self.info.rename:
                 self.info.rename = decl.name
         else:
             self.class_ = decl
         self.class_ = copy.deepcopy(self.class_)
     else:
         self.class_ = None
Пример #3
0
 def SetDeclarations(self, declarations):
     def IsInternalName(name):
         '''Returns true if the given name looks like a internal compiler
         structure'''
         return name.startswith('__')
     
     Exporter.SetDeclarations(self, declarations)
     header = os.path.normpath(self.parser_header)
     for decl in declarations:
         # check if this declaration is in the header
         location = os.path.normpath(decl.location[0])
         if location != header or IsInternalName(decl.name):
             continue
         # ok, check the type of the declaration and export it accordingly
         self.HandleDeclaration(decl)
Пример #4
0
 def SetDeclarations(self, declarations):
     Exporter.SetDeclarations(self, declarations)
     self.enum = self.GetDeclaration(self.info.name)
Пример #5
0
 def SetDeclarations(self, declarations):
     Exporter.SetDeclarations(self, declarations)
     if self.declarations:
         self.enum = self.GetDeclaration(self.info.name)
     else:
         self.enum = None