def FromXml(self, Item, Key): self.Keyword = XmlAttribute(XmlNode(Item, '%s' % Key), 'Keyword') if self.Keyword == '': self.Keyword = XmlElement(Item, '%s/Keyword' % Key) self.HeaderFile = XmlElement(Item, '%s/HeaderFile' % Key) self.CommonDefines.FromXml(XmlNode(Item, '%s' % Key), Key) for HelpTextItem in XmlList(Item, '%s/HelpText' % Key): HelpTextObj = HelpTextXml() HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key) self.HelpText.append(HelpTextObj) LibraryClass = LibraryClassObject() LibraryClass.SetLibraryClass(self.Keyword) LibraryClass.SetIncludeHeader(self.HeaderFile) if self.CommonDefines.Usage: LibraryClass.SetUsage(self.CommonDefines.Usage) LibraryClass.SetSupArchList(self.CommonDefines.SupArchList) LibraryClass.SetSupModuleList(self.CommonDefines.SupModList) LibraryClass.SetFeatureFlag(ConvertNOTEQToNE(self.CommonDefines.FeatureFlag)) LibraryClass.SetHelpTextList(GetHelpTextList(self.HelpText)) return LibraryClass
def GenLibraryClasses(self, ContainerFile): if ContainerFile: pass Logger.Debug(2, "Generate %s ..." % TAB_LIBRARY_CLASSES) LibraryClassDeclarations = [] LibObj = self.DecParser.GetLibraryClassSectionObject() for Item in LibObj.GetAllLibraryclasses(): LibraryClass = LibraryClassObject() LibraryClass.SetLibraryClass(Item.Libraryclass) LibraryClass.SetSupArchList(Item.GetArchList()) LibraryClass.SetIncludeHeader(Item.File) HelpTxt = ParseGenericComment(Item.GetHeadComment() + \ Item.GetTailComment(), None, '@libraryclass') if HelpTxt: LibraryClass.SetHelpTextList([HelpTxt]) LibraryClassDeclarations.append(LibraryClass) self.SetLibraryClassList(self.GetLibraryClassList() + \ LibraryClassDeclarations)