Ejemplo n.º 1
0
    def GuidFactory(self, CName, FFE, Usage, GuidType, VariableName, HelpStr):
        Guid = GuidObject()
        Guid.SetCName(CName)
        Guid.SetFeatureFlag(FFE)
        Guid.SetGuidTypeList([GuidType])
        Guid.SetUsage(Usage)
        Guid.SetVariableName(VariableName)

        HelpTextObj = TextObject()
        HelpTextObj.SetLang('')
        HelpTextObj.SetString(HelpStr)
        Guid.SetHelpTextList([HelpTextObj])

        return Guid
Ejemplo n.º 2
0
    def FromXml(self, Item, Key):
        self.UiName = XmlAttribute(XmlNode(Item, '%s' % Key), 'UiName')
        self.GuidType = XmlAttribute(XmlNode(Item, '%s' % Key), 'GuidType')
        self.Notify = XmlAttribute(XmlNode(Item, '%s' % Key), 'Notify')
        self.CName = XmlElement(Item, '%s/CName' % Key)
        self.GuidValue = XmlElement(Item, '%s/GuidValue' % Key)
        self.VariableName = XmlElement(Item, '%s/VariableName' % 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)
        
        if self.Type == 'Guid':    
            GuidProtocolPpi = GuidObject()
        elif self.Type == 'Protocol':
            GuidProtocolPpi = ProtocolObject()
        else:
            GuidProtocolPpi = PpiObject()
        GuidProtocolPpi.SetHelpTextList(GetHelpTextList(self.HelpText))

        return GuidProtocolPpi
Ejemplo n.º 3
0
 def CreateGuidObject():
     Object = GuidObject()
     Object.SetGuidTypeList([])
     Object.SetUsage(None)
     Object.SetName(None)
     return Object