diff options
Diffstat (limited to 'BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py')
-rw-r--r-- | BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py b/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py index a747b02542..d4db9209eb 100644 --- a/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py +++ b/BaseTools/Source/Python/UPT/Xml/GuidProtocolPpiXml.py @@ -3,9 +3,9 @@ #
# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
#
-# This program and the accompanying materials are licensed and made available
-# under the terms and conditions of the BSD License which accompanies this
-# distribution. The full text of the license may be found at
+# This program and the accompanying materials are licensed and made available
+# under the terms and conditions of the BSD License which accompanies this
+# distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@@ -46,17 +46,17 @@ class GuidProtocolPpiXml(object): self.CommonDefines = CommonDefinesXml()
self.HelpText = []
#
- # Guid/Ppi/Library, internal used for indicate return object for
+ # Guid/Ppi/Library, internal used for indicate return object for
# FromXml
#
- self.Type = ''
+ self.Type = ''
#
# there are slightly different field between package and module
#
self.Mode = Mode
self.GuidType = ''
self.VariableName = ''
-
+
def FromXml(self, Item, Key):
self.UiName = XmlAttribute(XmlNode(Item, '%s' % Key), 'UiName')
self.GuidType = XmlAttribute(XmlNode(Item, '%s' % Key), 'GuidType')
@@ -69,8 +69,8 @@ class GuidProtocolPpiXml(object): HelpTextObj = HelpTextXml()
HelpTextObj.FromXml(HelpTextItem, '%s/HelpText' % Key)
self.HelpText.append(HelpTextObj)
-
- if self.Type == 'Guid':
+
+ if self.Type == 'Guid':
GuidProtocolPpi = GuidObject()
elif self.Type == 'Protocol':
GuidProtocolPpi = ProtocolObject()
@@ -92,7 +92,7 @@ class GuidProtocolPpiXml(object): ['SupModList', GetStringOfList(GuidProtocolPpi.GetSupModuleList())], \
['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
['GuidValue', GuidProtocolPpi.GetGuid()],
['VariableName', GuidProtocolPpi.VariableName]
]
@@ -100,7 +100,7 @@ class GuidProtocolPpiXml(object): Tmp = HelpTextXml()
NodeList.append(Tmp.ToXml(Item))
Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)
-
+
return Root
def __str__(self):
@@ -118,12 +118,12 @@ class GuidXml(GuidProtocolPpiXml): def __init__(self, Mode):
GuidProtocolPpiXml.__init__(self, Mode)
self.Type = 'Guid'
-
- def FromXml(self, Item, Key):
+
+ def FromXml(self, Item, Key):
GuidProtocolPpi = GuidProtocolPpiXml.FromXml(self, Item, Key)
if self.Mode == 'Package':
-
+
GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)
GuidProtocolPpi.SetSupModuleList(self.CommonDefines.SupModList)
GuidProtocolPpi.SetCName(self.CName)
@@ -139,16 +139,16 @@ class GuidXml(GuidProtocolPpiXml): return GuidProtocolPpi
def ToXml(self, GuidProtocolPpi, Key):
- if self.Mode == 'Package':
+ if self.Mode == 'Package':
AttributeList = \
[['GuidType', \
GetStringOfList(GuidProtocolPpi.GetGuidTypeList())], \
['SupArchList', \
GetStringOfList(GuidProtocolPpi.GetSupArchList())], \
['SupModList', \
- GetStringOfList(GuidProtocolPpi.GetSupModuleList())],
+ GetStringOfList(GuidProtocolPpi.GetSupModuleList())],
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
['GuidValue', GuidProtocolPpi.GetGuid()],
]
else:
@@ -159,7 +159,7 @@ class GuidXml(GuidProtocolPpiXml): GetStringOfList(GuidProtocolPpi.GetSupArchList())], \
['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
['VariableName', GuidProtocolPpi.GetVariableName()]
]
@@ -167,7 +167,7 @@ class GuidXml(GuidProtocolPpiXml): Tmp = HelpTextXml()
NodeList.append(Tmp.ToXml(Item))
Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)
-
+
return Root
##
#Protocol Xml
@@ -176,11 +176,11 @@ class ProtocolXml(GuidProtocolPpiXml): def __init__(self, Mode):
GuidProtocolPpiXml.__init__(self, Mode)
self.Type = 'Protocol'
-
+
def FromXml(self, Item, Key):
GuidProtocolPpi = GuidProtocolPpiXml.FromXml(self, Item, Key)
if self.Mode == 'Package':
- GuidProtocolPpi.SetFeatureFlag(self.CommonDefines.FeatureFlag)
+ GuidProtocolPpi.SetFeatureFlag(self.CommonDefines.FeatureFlag)
GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)
GuidProtocolPpi.SetSupModuleList(self.CommonDefines.SupModList)
GuidProtocolPpi.SetCName(self.CName)
@@ -196,11 +196,11 @@ class ProtocolXml(GuidProtocolPpiXml): GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)
GuidProtocolPpi.SetFeatureFlag(ConvertNOTEQToNE(self.CommonDefines.FeatureFlag))
GuidProtocolPpi.SetCName(self.CName)
-
+
return GuidProtocolPpi
def ToXml(self, GuidProtocolPpi, Key):
- if self.Mode == 'Package':
+ if self.Mode == 'Package':
AttributeList = \
[['SupArchList', \
GetStringOfList(GuidProtocolPpi.GetSupArchList())], \
@@ -208,7 +208,7 @@ class ProtocolXml(GuidProtocolPpiXml): GetStringOfList(GuidProtocolPpi.GetSupModuleList())], \
['FeatureFlag', GuidProtocolPpi.GetFeatureFlag()]
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
['GuidValue', GuidProtocolPpi.GetGuid()],
]
else:
@@ -219,14 +219,14 @@ class ProtocolXml(GuidProtocolPpiXml): GetStringOfList(GuidProtocolPpi.GetSupArchList())], \
['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
]
-
+
for Item in GuidProtocolPpi.GetHelpTextList():
Tmp = HelpTextXml()
NodeList.append(Tmp.ToXml(Item))
Root = CreateXmlElement('%s' % Key, '', NodeList, AttributeList)
-
+
return Root
##
#Ppi Xml
@@ -235,7 +235,7 @@ class PpiXml(GuidProtocolPpiXml): def __init__(self, Mode):
GuidProtocolPpiXml.__init__(self, Mode)
self.Type = 'Ppi'
-
+
def FromXml(self, Item, Key):
GuidProtocolPpi = GuidProtocolPpiXml.FromXml(self, Item, Key)
if self.Mode == 'Package':
@@ -254,16 +254,16 @@ class PpiXml(GuidProtocolPpiXml): GuidProtocolPpi.SetSupArchList(self.CommonDefines.SupArchList)
GuidProtocolPpi.SetFeatureFlag(ConvertNOTEQToNE(self.CommonDefines.FeatureFlag))
GuidProtocolPpi.SetCName(self.CName)
-
+
return GuidProtocolPpi
def ToXml(self, GuidProtocolPpi, Key):
if self.Mode == 'Package':
AttributeList = \
[['SupArchList', \
- GetStringOfList(GuidProtocolPpi.GetSupArchList())],
+ GetStringOfList(GuidProtocolPpi.GetSupArchList())],
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
['GuidValue', GuidProtocolPpi.GetGuid()],
]
else:
@@ -274,9 +274,9 @@ class PpiXml(GuidProtocolPpiXml): GetStringOfList(GuidProtocolPpi.GetSupArchList())], \
['FeatureFlag', ConvertNEToNOTEQ(GuidProtocolPpi.GetFeatureFlag())]
]
- NodeList = [['CName', GuidProtocolPpi.GetCName()],
+ NodeList = [['CName', GuidProtocolPpi.GetCName()],
]
-
+
for Item in GuidProtocolPpi.GetHelpTextList():
Tmp = HelpTextXml()
NodeList.append(Tmp.ToXml(Item))
|