diff options
| author | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
|---|---|---|
| committer | kx <kx@radix.pro> | 2024-06-04 06:43:08 +0300 |
| commit | 7e2ccccace24636f29ddc210b94606abd4c7e42b (patch) | |
| tree | 545d43ea12671048956cafeb12303e84d601e571 /BaseTools/Source/Python/UPT/Object/POM | |
| parent | 27b044605cd5f6b33a3d231576003850b3fe305b (diff) | |
| download | edk2-trunk.tar.xz | |
Renormalized end-of-lines from master@27b044605cd5f6b33a3d231576003850b3fe305btrunk
Diffstat (limited to 'BaseTools/Source/Python/UPT/Object/POM')
| -rw-r--r-- | BaseTools/Source/Python/UPT/Object/POM/CommonObject.py | 1906 | ||||
| -rw-r--r-- | BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py | 1308 | ||||
| -rw-r--r-- | BaseTools/Source/Python/UPT/Object/POM/PackageObject.py | 384 | ||||
| -rw-r--r-- | BaseTools/Source/Python/UPT/Object/POM/__init__.py | 28 |
4 files changed, 1813 insertions, 1813 deletions
diff --git a/BaseTools/Source/Python/UPT/Object/POM/CommonObject.py b/BaseTools/Source/Python/UPT/Object/POM/CommonObject.py index ae8fe8306d..0cd33ef0f0 100644 --- a/BaseTools/Source/Python/UPT/Object/POM/CommonObject.py +++ b/BaseTools/Source/Python/UPT/Object/POM/CommonObject.py @@ -1,953 +1,953 @@ -## @file
-# This file is used to define common items of class object
-#
-# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-
-'''
-Common Object
-'''
-from Library.DataType import TAB_LANGUAGE_EN_US
-
-## HelpTextObject
-#
-# @param object: Inherited from object class
-#
-class HelpTextObject(object):
- def __init__(self):
- self.HelpText = TextObject()
-
- def SetHelpText(self, HelpText):
- self.HelpText = HelpText
-
- def GetHelpText(self):
- return self.HelpText
-
-## HelpTextListObject
-#
-# @param object: Inherited from object class
-#
-class HelpTextListObject(object):
- def __init__(self):
- self.HelpTextList = []
-
- def SetHelpTextList(self, HelpTextList):
- self.HelpTextList = HelpTextList
-
- def GetHelpTextList(self):
- return self.HelpTextList
-
-## PromptListObject
-#
-# @param object: Inherited from object class
-#
-class PromptListObject(object):
- def __init__(self):
- self.PromptList = []
-
- def SetPromptList(self, PromptList):
- self.PromptList = PromptList
-
- def GetPromptList(self):
- return self.PromptList
-
-## CommonPropertiesObject
-#
-# This class defined common attribution used in Module/Platform/Package files
-#
-# @param object: Inherited from object class
-# @param Usage: Input value for Usage, default is []
-# @param FeatureFlag: Input value for FeatureFalg, default is ''
-# @param SupArchList: Input value for SupArchList, default is []
-# @param HelpText: Input value for HelpText, default is ''
-# @param HelpTextList: Input value for HelpTextList, default is []
-#
-class CommonPropertiesObject(HelpTextObject, HelpTextListObject):
- def __init__(self):
- self.Usage = []
- self.FeatureFlag = ''
- self.SupArchList = []
- self.GuidValue = ''
- HelpTextObject.__init__(self)
- HelpTextListObject.__init__(self)
-
- def SetUsage(self, Usage):
- self.Usage = Usage
-
- def GetUsage(self):
- return self.Usage
-
- def SetFeatureFlag(self, FeatureFlag):
- self.FeatureFlag = FeatureFlag
-
- def GetFeatureFlag(self):
- return self.FeatureFlag
-
- def SetSupArchList(self, SupArchList):
- self.SupArchList = SupArchList
-
- def GetSupArchList(self):
- return self.SupArchList
-
- def SetGuidValue(self, GuidValue):
- self.GuidValue = GuidValue
-
- def GetGuidValue(self):
- return self.GuidValue
-
-## CommonHeaderObject
-#
-# This class defined common header items used in Module/Platform/Package files
-#
-# @param object: Inherited from object class
-#
-class CommonHeaderObject(object):
- def __init__(self):
- self.AbstractList = []
- self.DescriptionList = []
- self.CopyrightList = []
- self.LicenseList = []
-
- def SetAbstract(self, Abstract):
- if isinstance(Abstract, list):
- self.AbstractList = Abstract
- else:
- self.AbstractList.append(Abstract)
-
- def GetAbstract(self):
- return self.AbstractList
-
- def SetDescription(self, Description):
- if isinstance(Description, list):
- self.DescriptionList = Description
- else:
- self.DescriptionList.append(Description)
-
- def GetDescription(self):
- return self.DescriptionList
-
- def SetCopyright(self, Copyright):
- if isinstance(Copyright, list):
- self.CopyrightList = Copyright
- else:
- self.CopyrightList.append(Copyright)
-
- def GetCopyright(self):
- return self.CopyrightList
-
- def SetLicense(self, License):
- if isinstance(License, list):
- self.LicenseList = License
- else:
- self.LicenseList.append(License)
-
- def GetLicense(self):
- return self.LicenseList
-
-## BinaryHeaderObject
-#
-# This class defined Binary header items used in Module/Platform/Package files
-#
-# @param object: Inherited from object class
-#
-class BinaryHeaderObject(object):
- def __init__(self):
- self.BinaryHeaderAbstractList = []
- self.BinaryHeaderDescriptionList = []
- self.BinaryHeaderCopyrightList = []
- self.BinaryHeaderLicenseList = []
-
- def SetBinaryHeaderAbstract(self, Abstract):
- if isinstance(Abstract, list) and Abstract:
- self.BinaryHeaderAbstractList = Abstract
- elif isinstance(Abstract, tuple) and Abstract[1]:
- self.BinaryHeaderAbstractList.append(Abstract)
-
- def GetBinaryHeaderAbstract(self):
- return self.BinaryHeaderAbstractList
-
- def SetBinaryHeaderDescription(self, Description):
- if isinstance(Description, list) and Description:
- self.BinaryHeaderDescriptionList = Description
- elif isinstance(Description, tuple) and Description[1]:
- self.BinaryHeaderDescriptionList.append(Description)
-
- def GetBinaryHeaderDescription(self):
- return self.BinaryHeaderDescriptionList
-
- def SetBinaryHeaderCopyright(self, Copyright):
- if isinstance(Copyright, list) and Copyright:
- self.BinaryHeaderCopyrightList = Copyright
- elif isinstance(Copyright, tuple) and Copyright[1]:
- self.BinaryHeaderCopyrightList.append(Copyright)
-
- def GetBinaryHeaderCopyright(self):
- return self.BinaryHeaderCopyrightList
-
- def SetBinaryHeaderLicense(self, License):
- if isinstance(License, list) and License:
- self.BinaryHeaderLicenseList = License
- elif isinstance(License, tuple) and License[1]:
- self.BinaryHeaderLicenseList.append(License)
-
- def GetBinaryHeaderLicense(self):
- return self.BinaryHeaderLicenseList
-
-## ClonedRecordObject
-#
-# This class defined ClonedRecord items used in Module/Platform/Package files
-#
-# @param object: Inherited from object class
-#
-class ClonedRecordObject(object):
- def __init__(self):
- self.IdNum = 0
- self.FarGuid = ''
- self.PackageGuid = ''
- self.PackageVersion = ''
- self.ModuleGuid = ''
- self.ModuleVersion = ''
-
- def SetId(self, IdNo):
- self.IdNum = IdNo
-
- def GetId(self):
- return self.IdNum
-
- def SetFarGuid(self, FarGuid):
- self.FarGuid = FarGuid
-
- def GetFarGuid(self):
- return self.FarGuid
-
- def SetPackageGuid(self, PackageGuid):
- self.PackageGuid = PackageGuid
-
- def GetPackageGuid(self):
- return self.PackageGuid
-
- def SetPackageVersion(self, PackageVersion):
- self.PackageVersion = PackageVersion
-
- def GetPackageVersion(self):
- return self.PackageVersion
-
- def SetModuleGuid(self, ModuleGuid):
- self.ModuleGuid = ModuleGuid
-
- def GetModuleGuid(self):
- return self.ModuleGuid
-
- def SetModuleVersion(self, ModuleVersion):
- self.ModuleVersion = ModuleVersion
-
- def GetModuleVersion(self):
- return self.ModuleVersion
-
-## TextObject
-#
-# This class defined Text item used in PKG file
-#
-# @param object: Inherited from object class
-#
-class TextObject(object):
- def __init__(self):
- self.Lang = TAB_LANGUAGE_EN_US
- self.String = ''
-
- def SetLang(self, Lang):
- self.Lang = Lang
-
- def GetLang(self):
- return self.Lang
-
- def SetString(self, String):
- self.String = String
-
- def GetString(self):
- return self.String
-
-## FileNameObject
-#
-# This class defined File item used in module, for binary files
-#
-# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class
-#
-class FileNameObject(CommonPropertiesObject):
- def __init__(self):
- self.FileType = ''
- self.Filename = ''
- CommonPropertiesObject.__init__(self)
-
- def SetFileType(self, FileType):
- self.FileType = FileType
-
- def GetFileType(self):
- return self.FileType
-
- def SetFilename(self, Filename):
- self.Filename = Filename
-
- def GetFilename(self):
- return self.Filename
-
-## FileObject
-#
-# This class defined File item used in PKG file
-#
-# @param object: Inherited from object class
-#
-class FileObject(object):
- def __init__(self):
- self.Executable = ''
- self.Uri = ''
- self.OsType = ''
-
- def SetExecutable(self, Executable):
- self.Executable = Executable
-
- def GetExecutable(self):
- return self.Executable
-
- def SetURI(self, URI):
- self.Uri = URI
-
- def GetURI(self):
- return self.Uri
-
- def SetOS(self, OsType):
- self.OsType = OsType
-
- def GetOS(self):
- return self.OsType
-
-##
-# MiscFileObject is used for xml
-#
-# @param CommonHeaderObject: Inherited from CommonHeaderObject class
-#
-class MiscFileObject(CommonHeaderObject):
- def __init__(self):
- self.Name = ''
- self.FileList = []
- CommonHeaderObject.__init__(self)
-
- def SetName(self, Name):
- self.Name = Name
-
- def GetName(self):
- return self.Name
-
- def SetFileList(self, FileList):
- self.FileList = FileList
-
- def GetFileList(self):
- return self.FileList
-
-##
-# ToolsObject
-#
-class ToolsObject(MiscFileObject):
- pass
-
-## GuidVersionObject
-#
-# This class defined GUID/Version items used in PKG file
-#
-# @param object: Inherited from object class
-#
-class GuidVersionObject(object):
- def __init__(self):
- self.Guid = ''
- self.Version = ''
-
- def SetGuid(self, Guid):
- self.Guid = Guid
-
- def GetGuid(self):
- return self.Guid
-
- def SetVersion(self, Version):
- self.Version = Version
-
- def GetVersion(self):
- return self.Version
-
-## IdentificationObject
-#
-# This class defined Identification items used in Module/Platform/Package files
-#
-# @param object: Inherited from object class
-#
-class IdentificationObject(GuidVersionObject):
- def __init__(self):
- self.Name = ''
- self.BaseName = ''
- self.FileName = ''
- self.FullPath = ''
- self.RelaPath = ''
- self.PackagePath = ''
- self.ModulePath = ''
- self.CombinePath = ''
- GuidVersionObject.__init__(self)
-
- def SetName(self, Name):
- self.Name = Name
-
- def GetName(self):
- return self.Name
-
- def SetBaseName(self, BaseName):
- self.BaseName = BaseName
-
- def GetBaseName(self):
- return self.BaseName
-
- def SetFileName(self, FileName):
- self.FileName = FileName
-
- def GetFileName(self):
- return self.FileName
-
- def SetFullPath(self, FullPath):
- self.FullPath = FullPath
-
- def GetFullPath(self):
- return self.FullPath
-
- def SetRelaPath(self, RelaPath):
- self.RelaPath = RelaPath
-
- def GetRelaPath(self):
- return self.RelaPath
-
- def SetPackagePath(self, PackagePath):
- self.PackagePath = PackagePath
-
- def GetPackagePath(self):
- return self.PackagePath
-
- def SetModulePath(self, ModulePath):
- self.ModulePath = ModulePath
-
- def GetModulePath(self):
- return self.ModulePath
-
- def SetCombinePath(self, CombinePath):
- self.CombinePath = CombinePath
-
- def GetCombinePath(self):
- return self.CombinePath
-
-## GuidProtocolPpiCommonObject
-#
-# This class defined Guid, Protocol and Ppi like items used in
-# Module/Platform/Package files
-#
-# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class
-#
-class GuidProtocolPpiCommonObject(CommonPropertiesObject):
- def __init__(self):
- self.Name = ''
- self.CName = ''
- self.Guid = ''
- self.SupModuleList = []
- CommonPropertiesObject.__init__(self)
-
- def SetName(self, Name):
- self.Name = Name
-
- def GetName(self):
- return self.Name
-
- def SetCName(self, CName):
- self.CName = CName
-
- def GetCName(self):
- return self.CName
-
- def SetGuid(self, Guid):
- self.Guid = Guid
-
- def GetGuid(self):
- return self.Guid
-
- def SetSupModuleList(self, SupModuleList):
- self.SupModuleList = SupModuleList
-
- def GetSupModuleList(self):
- return self.SupModuleList
-
-## GuidObject
-#
-# This class defined Guid item used in Module/Platform/Package files
-#
-# @param GuidProtocolPpiCommonObject: GuidProtocolPpiCommonObject
-#
-class GuidObject(GuidProtocolPpiCommonObject):
- def __init__(self):
- self.VariableName = ''
- self.GuidTypeList = []
- GuidProtocolPpiCommonObject.__init__(self)
- def SetVariableName(self, VariableName):
- self.VariableName = VariableName
-
- def GetVariableName(self):
- return self.VariableName
-
- def SetGuidTypeList(self, GuidTypeList):
- self.GuidTypeList = GuidTypeList
-
- def GetGuidTypeList(self):
- return self.GuidTypeList
-
-## ProtocolObject
-#
-# This class defined Protocol item used in Module/Platform/Package files
-#
-# @param GuidProtocolPpiCommonObject: Inherited from
-# GuidProtocolPpiCommonObject
-#
-class ProtocolObject(GuidProtocolPpiCommonObject):
- def __init__(self):
- self.Notify = False
- GuidProtocolPpiCommonObject.__init__(self)
- def SetNotify(self, Notify):
- self.Notify = Notify
-
- def GetNotify(self):
- return self.Notify
-
-## PpiObject
-#
-# This class defined Ppi item used in Module/Platform/Package files
-#
-# @param GuidProtocolPpiCommonObject: Inherited from
-# GuidProtocolPpiCommonObject
-#
-class PpiObject(GuidProtocolPpiCommonObject):
- def __init__(self):
- self.Notify = False
- GuidProtocolPpiCommonObject.__init__(self)
- def SetNotify(self, Notify):
- self.Notify = Notify
-
- def GetNotify(self):
- return self.Notify
-
-## DefineObject
-#
-# This class defined item DEFINE used in Module/Platform/Package files
-#
-# @param object: Inherited from object class
-#
-class DefineClass(object):
- def __init__(self):
- self.Define = {}
-
-## UserExtensionObject
-#
-# @param object: Inherited from object class
-#
-class UserExtensionObject(object):
- def __init__(self):
- self.UserID = ''
- self.Identifier = ''
- self.BinaryAbstractList = []
- self.BinaryDescriptionList = []
- self.BinaryCopyrightList = []
- self.BinaryLicenseList = []
- self.UniLangDefsList = []
- #
- # { Statement : Arch , ... }
- #
- self.DefinesDict = {}
- #
- # { Arch : Statement , ... }
- #
- self.BuildOptionDict = {}
- self.IncludesDict = {}
- self.SourcesDict = {}
- self.BinariesDict = {}
- #
- # UserExtension statement from meta-data file [UserExtension] section
- #
- self.Statement = ''
- self.SupArchList = []
-
- def SetStatement(self, Statement):
- self.Statement = Statement
-
- def GetStatement(self):
- return self.Statement
-
- def SetSupArchList(self, ArchList):
- self.SupArchList = ArchList
-
- def GetSupArchList(self):
- return self.SupArchList
-
- def SetUserID(self, UserID):
- self.UserID = UserID
-
- def GetUserID(self):
- return self.UserID
-
- def SetIdentifier(self, Identifier):
- self.Identifier = Identifier
-
- def GetIdentifier(self):
- return self.Identifier
-
- def SetUniLangDefsList(self, UniLangDefsList):
- self.UniLangDefsList = UniLangDefsList
-
- def GetUniLangDefsList(self):
- return self.UniLangDefsList
-
- def SetBinaryAbstract(self, BinaryAbstractList):
- self.BinaryAbstractList = BinaryAbstractList
-
- def GetBinaryAbstract(self, Lang=None):
- if Lang:
- for (Key, Value) in self.BinaryAbstractList:
- if Key == Lang:
- return Value
- return None
- else:
- return self.BinaryAbstractList
-
- def SetBinaryDescription(self, BinaryDescriptionList):
- self.BinaryDescriptionList = BinaryDescriptionList
-
- def GetBinaryDescription(self, Lang=None):
- if Lang:
- for (Key, Value) in self.BinaryDescriptionList:
- if Key == Lang:
- return Value
- return None
- else:
- return self.BinaryDescriptionList
-
- def SetBinaryCopyright(self, BinaryCopyrightList):
- self.BinaryCopyrightList = BinaryCopyrightList
-
- def GetBinaryCopyright(self, Lang=None):
- if Lang:
- for (Key, Value) in self.BinaryCopyrightList:
- if Key == Lang:
- return Value
- return None
- else:
- return self.BinaryCopyrightList
-
- def SetBinaryLicense(self, BinaryLicenseList):
- self.BinaryLicenseList = BinaryLicenseList
-
- def GetBinaryLicense(self, Lang=None):
- if Lang:
- for (Key, Value) in self.BinaryLicenseList:
- if Key == Lang:
- return Value
- return None
- else:
- return self.BinaryLicenseList
-
- def SetDefinesDict(self, DefinesDict):
- self.DefinesDict = DefinesDict
-
- def GetDefinesDict(self):
- return self.DefinesDict
-
- def SetBuildOptionDict(self, BuildOptionDict):
- self.BuildOptionDict = BuildOptionDict
-
- def GetBuildOptionDict(self):
- return self.BuildOptionDict
-
- def SetIncludesDict(self, IncludesDict):
- self.IncludesDict = IncludesDict
-
- def GetIncludesDict(self):
- return self.IncludesDict
-
- def SetSourcesDict(self, SourcesDict):
- self.SourcesDict = SourcesDict
-
- def GetSourcesDict(self):
- return self.SourcesDict
-
- def SetBinariesDict(self, BinariesDict):
- self.BinariesDict = BinariesDict
-
- def GetBinariesDict(self):
- return self.BinariesDict
-
-## LibraryClassObject
-#
-# This class defined Library item used in Module/Platform/Package files
-#
-# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class
-#
-class LibraryClassObject(CommonPropertiesObject):
- def __init__(self):
- self.LibraryClass = ''
- self.IncludeHeader = ''
- self.SupModuleList = []
- self.RecommendedInstance = GuidVersionObject()
- CommonPropertiesObject.__init__(self)
-
- def SetLibraryClass(self, LibraryClass):
- self.LibraryClass = LibraryClass
-
- def GetLibraryClass(self):
- return self.LibraryClass
-
- def SetSupModuleList(self, SupModuleList):
- self.SupModuleList = SupModuleList
-
- def GetSupModuleList(self):
- return self.SupModuleList
-
- def SetIncludeHeader(self, IncludeHeader):
- self.IncludeHeader = IncludeHeader
-
- def GetIncludeHeader(self):
- return self.IncludeHeader
-
- def SetRecommendedInstance(self, RecommendedInstance):
- self.RecommendedInstance = RecommendedInstance
-
- def GetRecommendedInstance(self):
- return self.RecommendedInstance
-
-
-## PcdErrorObject
-#
-# @param object: Inherited from object class
-#
-class PcdErrorObject(object):
- def __init__(self):
- self.ValidValue = ''
- self.ValidValueLang = ''
- self.ValidValueRange = ''
- self.Expression = ''
- self.ErrorNumber = ''
- self.ErrorMessageList = []
- self.TokenSpaceGuidCName = ''
- self.CName = ''
- self.FileLine = ''
- self.LineNum = 0
-
- def SetValidValue(self, ValidValue):
- self.ValidValue = ValidValue
-
- def GetValidValue(self):
- return self.ValidValue
-
- def SetValidValueLang(self, ValidValueLang):
- self.ValidValueLang = ValidValueLang
-
- def GetValidValueLang(self):
- return self.ValidValueLang
-
- def SetValidValueRange(self, ValidValueRange):
- self.ValidValueRange = ValidValueRange
-
- def GetValidValueRange(self):
- return self.ValidValueRange
-
- def SetExpression(self, Expression):
- self.Expression = Expression
-
- def GetExpression(self):
- return self.Expression
-
- def SetErrorNumber(self, ErrorNumber):
- self.ErrorNumber = ErrorNumber
-
- def GetErrorNumber(self):
- return self.ErrorNumber
-
- def SetErrorMessageList(self, ErrorMessageList):
- self.ErrorMessageList = ErrorMessageList
-
- def GetErrorMessageList(self):
- return self.ErrorMessageList
-
- def SetTokenSpaceGuidCName(self, TokenSpaceGuidCName):
- self.TokenSpaceGuidCName = TokenSpaceGuidCName
-
- def GetTokenSpaceGuidCName(self):
- return self.TokenSpaceGuidCName
-
- def SetCName(self, CName):
- self.CName = CName
-
- def GetCName(self):
- return self.CName
-
- def SetFileLine(self, FileLine):
- self.FileLine = FileLine
-
- def GetFileLine(self):
- return self.FileLine
-
- def SetLineNum(self, LineNum):
- self.LineNum = LineNum
-
- def GetLineNum(self):
- return self.LineNum
-
-
-## IncludeObject
-#
-# This class defined Include item used in Module/Platform/Package files
-#
-# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class
-#
-class IncludeObject(CommonPropertiesObject):
- def __init__(self):
- self.FilePath = ''
- self.ModuleType = ''
- self.SupModuleList = []
- self.Comment = ''
- CommonPropertiesObject.__init__(self)
-
- def SetFilePath(self, FilePath):
- self.FilePath = FilePath
-
- def GetFilePath(self):
- return self.FilePath
-
- def SetModuleType(self, ModuleType):
- self.ModuleType = ModuleType
-
- def GetModuleType(self):
- return self.ModuleType
-
- def SetSupModuleList(self, SupModuleList):
- self.SupModuleList = SupModuleList
-
- def GetSupModuleList(self):
- return self.SupModuleList
-
- def SetComment(self, Comment):
- self.Comment = Comment
-
- def GetComment(self):
- return self.Comment
-
-## PcdObject
-#
-# This class defined Pcd item used in Module/Platform/Package files
-#
-# @param CName: Input value for CName, default is ''
-# @param Token: Input value for Token, default is ''
-# @param TokenSpaceGuidCName: Input value for TokenSpaceGuidCName, default is
-# ''
-# @param DatumType: Input value for DatumType, default is ''
-# @param MaxDatumSize: Input value for MaxDatumSize, default is ''
-# @param DefaultValue: Input value for DefaultValue, default is ''
-# @param ItemType: Input value for ItemType, default is ''
-# @param ValidUsage: Input value for ValidUsage, default is []
-# @param SkuInfoList: Input value for SkuInfoList, default is {}
-# @param SupModuleList: Input value for SupModuleList, default is []
-#
-class PcdObject(CommonPropertiesObject, HelpTextListObject, PromptListObject):
- def __init__(self):
- self.PcdCName = ''
- self.CName = ''
- self.Token = ''
- self.TokenSpaceGuidCName = ''
- self.TokenSpaceGuidValue = ''
- self.DatumType = ''
- self.MaxDatumSize = ''
- self.DefaultValue = ''
- self.Offset = ''
- self.ValidUsage = ''
- self.ItemType = ''
- self.PcdErrorsList = []
- self.SupModuleList = []
- CommonPropertiesObject.__init__(self)
- HelpTextListObject.__init__(self)
- PromptListObject.__init__(self)
-
- def SetPcdCName(self, PcdCName):
- self.PcdCName = PcdCName
-
- def GetPcdCName(self):
- return self.PcdCName
-
- def SetCName(self, CName):
- self.CName = CName
-
- def GetCName(self):
- return self.CName
-
- def SetToken(self, Token):
- self.Token = Token
-
- def GetOffset(self):
- return self.Offset
-
- def SetOffset(self, Offset):
- self.Offset = Offset
-
- def GetToken(self):
- return self.Token
-
- def SetTokenSpaceGuidCName(self, TokenSpaceGuidCName):
- self.TokenSpaceGuidCName = TokenSpaceGuidCName
-
- def GetTokenSpaceGuidCName(self):
- return self.TokenSpaceGuidCName
-
- def SetTokenSpaceGuidValue(self, TokenSpaceGuidValue):
- self.TokenSpaceGuidValue = TokenSpaceGuidValue
-
- def GetTokenSpaceGuidValue(self):
- return self.TokenSpaceGuidValue
-
- def SetDatumType(self, DatumType):
- self.DatumType = DatumType
-
- def GetDatumType(self):
- return self.DatumType
-
- def SetMaxDatumSize(self, MaxDatumSize):
- self.MaxDatumSize = MaxDatumSize
-
- def GetMaxDatumSize(self):
- return self.MaxDatumSize
-
- def SetDefaultValue(self, DefaultValue):
- self.DefaultValue = DefaultValue
-
- def GetDefaultValue(self):
- return self.DefaultValue
-
- def SetValidUsage(self, ValidUsage):
- self.ValidUsage = ValidUsage
-
- def GetValidUsage(self):
- return self.ValidUsage
-
- def SetPcdErrorsList(self, PcdErrorsList):
- self.PcdErrorsList = PcdErrorsList
-
- def GetPcdErrorsList(self):
- return self.PcdErrorsList
-
- def SetItemType(self, ItemType):
- self.ItemType = ItemType
-
- def GetItemType(self):
- return self.ItemType
-
- def SetSupModuleList(self, SupModuleList):
- self.SupModuleList = SupModuleList
-
- def GetSupModuleList(self):
- return self.SupModuleList
+## @file +# This file is used to define common items of class object +# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent + +''' +Common Object +''' +from Library.DataType import TAB_LANGUAGE_EN_US + +## HelpTextObject +# +# @param object: Inherited from object class +# +class HelpTextObject(object): + def __init__(self): + self.HelpText = TextObject() + + def SetHelpText(self, HelpText): + self.HelpText = HelpText + + def GetHelpText(self): + return self.HelpText + +## HelpTextListObject +# +# @param object: Inherited from object class +# +class HelpTextListObject(object): + def __init__(self): + self.HelpTextList = [] + + def SetHelpTextList(self, HelpTextList): + self.HelpTextList = HelpTextList + + def GetHelpTextList(self): + return self.HelpTextList + +## PromptListObject +# +# @param object: Inherited from object class +# +class PromptListObject(object): + def __init__(self): + self.PromptList = [] + + def SetPromptList(self, PromptList): + self.PromptList = PromptList + + def GetPromptList(self): + return self.PromptList + +## CommonPropertiesObject +# +# This class defined common attribution used in Module/Platform/Package files +# +# @param object: Inherited from object class +# @param Usage: Input value for Usage, default is [] +# @param FeatureFlag: Input value for FeatureFalg, default is '' +# @param SupArchList: Input value for SupArchList, default is [] +# @param HelpText: Input value for HelpText, default is '' +# @param HelpTextList: Input value for HelpTextList, default is [] +# +class CommonPropertiesObject(HelpTextObject, HelpTextListObject): + def __init__(self): + self.Usage = [] + self.FeatureFlag = '' + self.SupArchList = [] + self.GuidValue = '' + HelpTextObject.__init__(self) + HelpTextListObject.__init__(self) + + def SetUsage(self, Usage): + self.Usage = Usage + + def GetUsage(self): + return self.Usage + + def SetFeatureFlag(self, FeatureFlag): + self.FeatureFlag = FeatureFlag + + def GetFeatureFlag(self): + return self.FeatureFlag + + def SetSupArchList(self, SupArchList): + self.SupArchList = SupArchList + + def GetSupArchList(self): + return self.SupArchList + + def SetGuidValue(self, GuidValue): + self.GuidValue = GuidValue + + def GetGuidValue(self): + return self.GuidValue + +## CommonHeaderObject +# +# This class defined common header items used in Module/Platform/Package files +# +# @param object: Inherited from object class +# +class CommonHeaderObject(object): + def __init__(self): + self.AbstractList = [] + self.DescriptionList = [] + self.CopyrightList = [] + self.LicenseList = [] + + def SetAbstract(self, Abstract): + if isinstance(Abstract, list): + self.AbstractList = Abstract + else: + self.AbstractList.append(Abstract) + + def GetAbstract(self): + return self.AbstractList + + def SetDescription(self, Description): + if isinstance(Description, list): + self.DescriptionList = Description + else: + self.DescriptionList.append(Description) + + def GetDescription(self): + return self.DescriptionList + + def SetCopyright(self, Copyright): + if isinstance(Copyright, list): + self.CopyrightList = Copyright + else: + self.CopyrightList.append(Copyright) + + def GetCopyright(self): + return self.CopyrightList + + def SetLicense(self, License): + if isinstance(License, list): + self.LicenseList = License + else: + self.LicenseList.append(License) + + def GetLicense(self): + return self.LicenseList + +## BinaryHeaderObject +# +# This class defined Binary header items used in Module/Platform/Package files +# +# @param object: Inherited from object class +# +class BinaryHeaderObject(object): + def __init__(self): + self.BinaryHeaderAbstractList = [] + self.BinaryHeaderDescriptionList = [] + self.BinaryHeaderCopyrightList = [] + self.BinaryHeaderLicenseList = [] + + def SetBinaryHeaderAbstract(self, Abstract): + if isinstance(Abstract, list) and Abstract: + self.BinaryHeaderAbstractList = Abstract + elif isinstance(Abstract, tuple) and Abstract[1]: + self.BinaryHeaderAbstractList.append(Abstract) + + def GetBinaryHeaderAbstract(self): + return self.BinaryHeaderAbstractList + + def SetBinaryHeaderDescription(self, Description): + if isinstance(Description, list) and Description: + self.BinaryHeaderDescriptionList = Description + elif isinstance(Description, tuple) and Description[1]: + self.BinaryHeaderDescriptionList.append(Description) + + def GetBinaryHeaderDescription(self): + return self.BinaryHeaderDescriptionList + + def SetBinaryHeaderCopyright(self, Copyright): + if isinstance(Copyright, list) and Copyright: + self.BinaryHeaderCopyrightList = Copyright + elif isinstance(Copyright, tuple) and Copyright[1]: + self.BinaryHeaderCopyrightList.append(Copyright) + + def GetBinaryHeaderCopyright(self): + return self.BinaryHeaderCopyrightList + + def SetBinaryHeaderLicense(self, License): + if isinstance(License, list) and License: + self.BinaryHeaderLicenseList = License + elif isinstance(License, tuple) and License[1]: + self.BinaryHeaderLicenseList.append(License) + + def GetBinaryHeaderLicense(self): + return self.BinaryHeaderLicenseList + +## ClonedRecordObject +# +# This class defined ClonedRecord items used in Module/Platform/Package files +# +# @param object: Inherited from object class +# +class ClonedRecordObject(object): + def __init__(self): + self.IdNum = 0 + self.FarGuid = '' + self.PackageGuid = '' + self.PackageVersion = '' + self.ModuleGuid = '' + self.ModuleVersion = '' + + def SetId(self, IdNo): + self.IdNum = IdNo + + def GetId(self): + return self.IdNum + + def SetFarGuid(self, FarGuid): + self.FarGuid = FarGuid + + def GetFarGuid(self): + return self.FarGuid + + def SetPackageGuid(self, PackageGuid): + self.PackageGuid = PackageGuid + + def GetPackageGuid(self): + return self.PackageGuid + + def SetPackageVersion(self, PackageVersion): + self.PackageVersion = PackageVersion + + def GetPackageVersion(self): + return self.PackageVersion + + def SetModuleGuid(self, ModuleGuid): + self.ModuleGuid = ModuleGuid + + def GetModuleGuid(self): + return self.ModuleGuid + + def SetModuleVersion(self, ModuleVersion): + self.ModuleVersion = ModuleVersion + + def GetModuleVersion(self): + return self.ModuleVersion + +## TextObject +# +# This class defined Text item used in PKG file +# +# @param object: Inherited from object class +# +class TextObject(object): + def __init__(self): + self.Lang = TAB_LANGUAGE_EN_US + self.String = '' + + def SetLang(self, Lang): + self.Lang = Lang + + def GetLang(self): + return self.Lang + + def SetString(self, String): + self.String = String + + def GetString(self): + return self.String + +## FileNameObject +# +# This class defined File item used in module, for binary files +# +# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class +# +class FileNameObject(CommonPropertiesObject): + def __init__(self): + self.FileType = '' + self.Filename = '' + CommonPropertiesObject.__init__(self) + + def SetFileType(self, FileType): + self.FileType = FileType + + def GetFileType(self): + return self.FileType + + def SetFilename(self, Filename): + self.Filename = Filename + + def GetFilename(self): + return self.Filename + +## FileObject +# +# This class defined File item used in PKG file +# +# @param object: Inherited from object class +# +class FileObject(object): + def __init__(self): + self.Executable = '' + self.Uri = '' + self.OsType = '' + + def SetExecutable(self, Executable): + self.Executable = Executable + + def GetExecutable(self): + return self.Executable + + def SetURI(self, URI): + self.Uri = URI + + def GetURI(self): + return self.Uri + + def SetOS(self, OsType): + self.OsType = OsType + + def GetOS(self): + return self.OsType + +## +# MiscFileObject is used for xml +# +# @param CommonHeaderObject: Inherited from CommonHeaderObject class +# +class MiscFileObject(CommonHeaderObject): + def __init__(self): + self.Name = '' + self.FileList = [] + CommonHeaderObject.__init__(self) + + def SetName(self, Name): + self.Name = Name + + def GetName(self): + return self.Name + + def SetFileList(self, FileList): + self.FileList = FileList + + def GetFileList(self): + return self.FileList + +## +# ToolsObject +# +class ToolsObject(MiscFileObject): + pass + +## GuidVersionObject +# +# This class defined GUID/Version items used in PKG file +# +# @param object: Inherited from object class +# +class GuidVersionObject(object): + def __init__(self): + self.Guid = '' + self.Version = '' + + def SetGuid(self, Guid): + self.Guid = Guid + + def GetGuid(self): + return self.Guid + + def SetVersion(self, Version): + self.Version = Version + + def GetVersion(self): + return self.Version + +## IdentificationObject +# +# This class defined Identification items used in Module/Platform/Package files +# +# @param object: Inherited from object class +# +class IdentificationObject(GuidVersionObject): + def __init__(self): + self.Name = '' + self.BaseName = '' + self.FileName = '' + self.FullPath = '' + self.RelaPath = '' + self.PackagePath = '' + self.ModulePath = '' + self.CombinePath = '' + GuidVersionObject.__init__(self) + + def SetName(self, Name): + self.Name = Name + + def GetName(self): + return self.Name + + def SetBaseName(self, BaseName): + self.BaseName = BaseName + + def GetBaseName(self): + return self.BaseName + + def SetFileName(self, FileName): + self.FileName = FileName + + def GetFileName(self): + return self.FileName + + def SetFullPath(self, FullPath): + self.FullPath = FullPath + + def GetFullPath(self): + return self.FullPath + + def SetRelaPath(self, RelaPath): + self.RelaPath = RelaPath + + def GetRelaPath(self): + return self.RelaPath + + def SetPackagePath(self, PackagePath): + self.PackagePath = PackagePath + + def GetPackagePath(self): + return self.PackagePath + + def SetModulePath(self, ModulePath): + self.ModulePath = ModulePath + + def GetModulePath(self): + return self.ModulePath + + def SetCombinePath(self, CombinePath): + self.CombinePath = CombinePath + + def GetCombinePath(self): + return self.CombinePath + +## GuidProtocolPpiCommonObject +# +# This class defined Guid, Protocol and Ppi like items used in +# Module/Platform/Package files +# +# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class +# +class GuidProtocolPpiCommonObject(CommonPropertiesObject): + def __init__(self): + self.Name = '' + self.CName = '' + self.Guid = '' + self.SupModuleList = [] + CommonPropertiesObject.__init__(self) + + def SetName(self, Name): + self.Name = Name + + def GetName(self): + return self.Name + + def SetCName(self, CName): + self.CName = CName + + def GetCName(self): + return self.CName + + def SetGuid(self, Guid): + self.Guid = Guid + + def GetGuid(self): + return self.Guid + + def SetSupModuleList(self, SupModuleList): + self.SupModuleList = SupModuleList + + def GetSupModuleList(self): + return self.SupModuleList + +## GuidObject +# +# This class defined Guid item used in Module/Platform/Package files +# +# @param GuidProtocolPpiCommonObject: GuidProtocolPpiCommonObject +# +class GuidObject(GuidProtocolPpiCommonObject): + def __init__(self): + self.VariableName = '' + self.GuidTypeList = [] + GuidProtocolPpiCommonObject.__init__(self) + def SetVariableName(self, VariableName): + self.VariableName = VariableName + + def GetVariableName(self): + return self.VariableName + + def SetGuidTypeList(self, GuidTypeList): + self.GuidTypeList = GuidTypeList + + def GetGuidTypeList(self): + return self.GuidTypeList + +## ProtocolObject +# +# This class defined Protocol item used in Module/Platform/Package files +# +# @param GuidProtocolPpiCommonObject: Inherited from +# GuidProtocolPpiCommonObject +# +class ProtocolObject(GuidProtocolPpiCommonObject): + def __init__(self): + self.Notify = False + GuidProtocolPpiCommonObject.__init__(self) + def SetNotify(self, Notify): + self.Notify = Notify + + def GetNotify(self): + return self.Notify + +## PpiObject +# +# This class defined Ppi item used in Module/Platform/Package files +# +# @param GuidProtocolPpiCommonObject: Inherited from +# GuidProtocolPpiCommonObject +# +class PpiObject(GuidProtocolPpiCommonObject): + def __init__(self): + self.Notify = False + GuidProtocolPpiCommonObject.__init__(self) + def SetNotify(self, Notify): + self.Notify = Notify + + def GetNotify(self): + return self.Notify + +## DefineObject +# +# This class defined item DEFINE used in Module/Platform/Package files +# +# @param object: Inherited from object class +# +class DefineClass(object): + def __init__(self): + self.Define = {} + +## UserExtensionObject +# +# @param object: Inherited from object class +# +class UserExtensionObject(object): + def __init__(self): + self.UserID = '' + self.Identifier = '' + self.BinaryAbstractList = [] + self.BinaryDescriptionList = [] + self.BinaryCopyrightList = [] + self.BinaryLicenseList = [] + self.UniLangDefsList = [] + # + # { Statement : Arch , ... } + # + self.DefinesDict = {} + # + # { Arch : Statement , ... } + # + self.BuildOptionDict = {} + self.IncludesDict = {} + self.SourcesDict = {} + self.BinariesDict = {} + # + # UserExtension statement from meta-data file [UserExtension] section + # + self.Statement = '' + self.SupArchList = [] + + def SetStatement(self, Statement): + self.Statement = Statement + + def GetStatement(self): + return self.Statement + + def SetSupArchList(self, ArchList): + self.SupArchList = ArchList + + def GetSupArchList(self): + return self.SupArchList + + def SetUserID(self, UserID): + self.UserID = UserID + + def GetUserID(self): + return self.UserID + + def SetIdentifier(self, Identifier): + self.Identifier = Identifier + + def GetIdentifier(self): + return self.Identifier + + def SetUniLangDefsList(self, UniLangDefsList): + self.UniLangDefsList = UniLangDefsList + + def GetUniLangDefsList(self): + return self.UniLangDefsList + + def SetBinaryAbstract(self, BinaryAbstractList): + self.BinaryAbstractList = BinaryAbstractList + + def GetBinaryAbstract(self, Lang=None): + if Lang: + for (Key, Value) in self.BinaryAbstractList: + if Key == Lang: + return Value + return None + else: + return self.BinaryAbstractList + + def SetBinaryDescription(self, BinaryDescriptionList): + self.BinaryDescriptionList = BinaryDescriptionList + + def GetBinaryDescription(self, Lang=None): + if Lang: + for (Key, Value) in self.BinaryDescriptionList: + if Key == Lang: + return Value + return None + else: + return self.BinaryDescriptionList + + def SetBinaryCopyright(self, BinaryCopyrightList): + self.BinaryCopyrightList = BinaryCopyrightList + + def GetBinaryCopyright(self, Lang=None): + if Lang: + for (Key, Value) in self.BinaryCopyrightList: + if Key == Lang: + return Value + return None + else: + return self.BinaryCopyrightList + + def SetBinaryLicense(self, BinaryLicenseList): + self.BinaryLicenseList = BinaryLicenseList + + def GetBinaryLicense(self, Lang=None): + if Lang: + for (Key, Value) in self.BinaryLicenseList: + if Key == Lang: + return Value + return None + else: + return self.BinaryLicenseList + + def SetDefinesDict(self, DefinesDict): + self.DefinesDict = DefinesDict + + def GetDefinesDict(self): + return self.DefinesDict + + def SetBuildOptionDict(self, BuildOptionDict): + self.BuildOptionDict = BuildOptionDict + + def GetBuildOptionDict(self): + return self.BuildOptionDict + + def SetIncludesDict(self, IncludesDict): + self.IncludesDict = IncludesDict + + def GetIncludesDict(self): + return self.IncludesDict + + def SetSourcesDict(self, SourcesDict): + self.SourcesDict = SourcesDict + + def GetSourcesDict(self): + return self.SourcesDict + + def SetBinariesDict(self, BinariesDict): + self.BinariesDict = BinariesDict + + def GetBinariesDict(self): + return self.BinariesDict + +## LibraryClassObject +# +# This class defined Library item used in Module/Platform/Package files +# +# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class +# +class LibraryClassObject(CommonPropertiesObject): + def __init__(self): + self.LibraryClass = '' + self.IncludeHeader = '' + self.SupModuleList = [] + self.RecommendedInstance = GuidVersionObject() + CommonPropertiesObject.__init__(self) + + def SetLibraryClass(self, LibraryClass): + self.LibraryClass = LibraryClass + + def GetLibraryClass(self): + return self.LibraryClass + + def SetSupModuleList(self, SupModuleList): + self.SupModuleList = SupModuleList + + def GetSupModuleList(self): + return self.SupModuleList + + def SetIncludeHeader(self, IncludeHeader): + self.IncludeHeader = IncludeHeader + + def GetIncludeHeader(self): + return self.IncludeHeader + + def SetRecommendedInstance(self, RecommendedInstance): + self.RecommendedInstance = RecommendedInstance + + def GetRecommendedInstance(self): + return self.RecommendedInstance + + +## PcdErrorObject +# +# @param object: Inherited from object class +# +class PcdErrorObject(object): + def __init__(self): + self.ValidValue = '' + self.ValidValueLang = '' + self.ValidValueRange = '' + self.Expression = '' + self.ErrorNumber = '' + self.ErrorMessageList = [] + self.TokenSpaceGuidCName = '' + self.CName = '' + self.FileLine = '' + self.LineNum = 0 + + def SetValidValue(self, ValidValue): + self.ValidValue = ValidValue + + def GetValidValue(self): + return self.ValidValue + + def SetValidValueLang(self, ValidValueLang): + self.ValidValueLang = ValidValueLang + + def GetValidValueLang(self): + return self.ValidValueLang + + def SetValidValueRange(self, ValidValueRange): + self.ValidValueRange = ValidValueRange + + def GetValidValueRange(self): + return self.ValidValueRange + + def SetExpression(self, Expression): + self.Expression = Expression + + def GetExpression(self): + return self.Expression + + def SetErrorNumber(self, ErrorNumber): + self.ErrorNumber = ErrorNumber + + def GetErrorNumber(self): + return self.ErrorNumber + + def SetErrorMessageList(self, ErrorMessageList): + self.ErrorMessageList = ErrorMessageList + + def GetErrorMessageList(self): + return self.ErrorMessageList + + def SetTokenSpaceGuidCName(self, TokenSpaceGuidCName): + self.TokenSpaceGuidCName = TokenSpaceGuidCName + + def GetTokenSpaceGuidCName(self): + return self.TokenSpaceGuidCName + + def SetCName(self, CName): + self.CName = CName + + def GetCName(self): + return self.CName + + def SetFileLine(self, FileLine): + self.FileLine = FileLine + + def GetFileLine(self): + return self.FileLine + + def SetLineNum(self, LineNum): + self.LineNum = LineNum + + def GetLineNum(self): + return self.LineNum + + +## IncludeObject +# +# This class defined Include item used in Module/Platform/Package files +# +# @param CommonPropertiesObject: Inherited from CommonPropertiesObject class +# +class IncludeObject(CommonPropertiesObject): + def __init__(self): + self.FilePath = '' + self.ModuleType = '' + self.SupModuleList = [] + self.Comment = '' + CommonPropertiesObject.__init__(self) + + def SetFilePath(self, FilePath): + self.FilePath = FilePath + + def GetFilePath(self): + return self.FilePath + + def SetModuleType(self, ModuleType): + self.ModuleType = ModuleType + + def GetModuleType(self): + return self.ModuleType + + def SetSupModuleList(self, SupModuleList): + self.SupModuleList = SupModuleList + + def GetSupModuleList(self): + return self.SupModuleList + + def SetComment(self, Comment): + self.Comment = Comment + + def GetComment(self): + return self.Comment + +## PcdObject +# +# This class defined Pcd item used in Module/Platform/Package files +# +# @param CName: Input value for CName, default is '' +# @param Token: Input value for Token, default is '' +# @param TokenSpaceGuidCName: Input value for TokenSpaceGuidCName, default is +# '' +# @param DatumType: Input value for DatumType, default is '' +# @param MaxDatumSize: Input value for MaxDatumSize, default is '' +# @param DefaultValue: Input value for DefaultValue, default is '' +# @param ItemType: Input value for ItemType, default is '' +# @param ValidUsage: Input value for ValidUsage, default is [] +# @param SkuInfoList: Input value for SkuInfoList, default is {} +# @param SupModuleList: Input value for SupModuleList, default is [] +# +class PcdObject(CommonPropertiesObject, HelpTextListObject, PromptListObject): + def __init__(self): + self.PcdCName = '' + self.CName = '' + self.Token = '' + self.TokenSpaceGuidCName = '' + self.TokenSpaceGuidValue = '' + self.DatumType = '' + self.MaxDatumSize = '' + self.DefaultValue = '' + self.Offset = '' + self.ValidUsage = '' + self.ItemType = '' + self.PcdErrorsList = [] + self.SupModuleList = [] + CommonPropertiesObject.__init__(self) + HelpTextListObject.__init__(self) + PromptListObject.__init__(self) + + def SetPcdCName(self, PcdCName): + self.PcdCName = PcdCName + + def GetPcdCName(self): + return self.PcdCName + + def SetCName(self, CName): + self.CName = CName + + def GetCName(self): + return self.CName + + def SetToken(self, Token): + self.Token = Token + + def GetOffset(self): + return self.Offset + + def SetOffset(self, Offset): + self.Offset = Offset + + def GetToken(self): + return self.Token + + def SetTokenSpaceGuidCName(self, TokenSpaceGuidCName): + self.TokenSpaceGuidCName = TokenSpaceGuidCName + + def GetTokenSpaceGuidCName(self): + return self.TokenSpaceGuidCName + + def SetTokenSpaceGuidValue(self, TokenSpaceGuidValue): + self.TokenSpaceGuidValue = TokenSpaceGuidValue + + def GetTokenSpaceGuidValue(self): + return self.TokenSpaceGuidValue + + def SetDatumType(self, DatumType): + self.DatumType = DatumType + + def GetDatumType(self): + return self.DatumType + + def SetMaxDatumSize(self, MaxDatumSize): + self.MaxDatumSize = MaxDatumSize + + def GetMaxDatumSize(self): + return self.MaxDatumSize + + def SetDefaultValue(self, DefaultValue): + self.DefaultValue = DefaultValue + + def GetDefaultValue(self): + return self.DefaultValue + + def SetValidUsage(self, ValidUsage): + self.ValidUsage = ValidUsage + + def GetValidUsage(self): + return self.ValidUsage + + def SetPcdErrorsList(self, PcdErrorsList): + self.PcdErrorsList = PcdErrorsList + + def GetPcdErrorsList(self): + return self.PcdErrorsList + + def SetItemType(self, ItemType): + self.ItemType = ItemType + + def GetItemType(self): + return self.ItemType + + def SetSupModuleList(self, SupModuleList): + self.SupModuleList = SupModuleList + + def GetSupModuleList(self): + return self.SupModuleList diff --git a/BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py b/BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py index 6e515a2c3f..de2d29bcca 100644 --- a/BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py +++ b/BaseTools/Source/Python/UPT/Object/POM/ModuleObject.py @@ -1,654 +1,654 @@ -## @file
-# This file is used to define a class object to describe a module
-#
-# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-
-'''
-ModuleObject
-'''
-
-##
-# Import Modules
-#
-from Object.POM.CommonObject import CommonPropertiesObject
-from Object.POM.CommonObject import IdentificationObject
-from Object.POM.CommonObject import CommonHeaderObject
-from Object.POM.CommonObject import BinaryHeaderObject
-from Object.POM.CommonObject import HelpTextListObject
-from Object.POM.CommonObject import GuidVersionObject
-
-
-##
-# BootModeObject
-#
-class BootModeObject(CommonPropertiesObject, HelpTextListObject):
- def __init__(self):
- self.SupportedBootModes = ''
- CommonPropertiesObject.__init__(self)
- HelpTextListObject.__init__(self)
-
- def SetSupportedBootModes(self, SupportedBootModes):
- self.SupportedBootModes = SupportedBootModes
-
- def GetSupportedBootModes(self):
- return self.SupportedBootModes
-
-##
-# EventObject
-#
-class EventObject(CommonPropertiesObject, HelpTextListObject):
- def __init__(self):
- self.EventType = ''
- CommonPropertiesObject.__init__(self)
- HelpTextListObject.__init__(self)
-
- def SetEventType(self, EventType):
- self.EventType = EventType
-
- def GetEventType(self):
- return self.EventType
-
-##
-# HobObject
-#
-class HobObject(CommonPropertiesObject, HelpTextListObject):
- def __init__(self):
- self.HobType = ''
- CommonPropertiesObject.__init__(self)
- HelpTextListObject.__init__(self)
-
- def SetHobType(self, HobType):
- self.HobType = HobType
-
- def GetHobType(self):
- return self.HobType
-
-##
-# SpecObject
-#
-class SpecObject(object):
- def __init__(self):
- self.Spec = ''
- self.Version = ''
-
- def SetSpec(self, Spec):
- self.Spec = Spec
-
- def GetSpec(self):
- return self.Spec
-
- def SetVersion(self, Version):
- self.Version = Version
-
- def GetVersion(self):
- return self.Version
-
-## ModuleHeaderObject
-#
-# This class defined header items used in Module file
-#
-class ModuleHeaderObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject):
- def __init__(self):
- self.IsLibrary = False
- self.IsLibraryModList = []
- self.ModuleType = ''
- self.BinaryModule = False
- self.PcdIsDriver = ''
- self.PiSpecificationVersion = ''
- self.UefiSpecificationVersion = ''
- self.UNIFlag = False
- self.ModuleUniFile = ''
- #
- # SpecObject
- #
- self.SpecList = []
- #
- # BootModeObject
- #
- self.BootModeList = []
- #
- # EventObject
- #
- self.EventList = []
- #
- # HobObject
- #
- self.HobList = []
- #
- # LibraryClassObject
- #
- self.LibraryClassList = []
- self.SupArchList = []
- IdentificationObject.__init__(self)
- CommonHeaderObject.__init__(self)
- BinaryHeaderObject.__init__(self)
-
- def SetIsLibrary(self, IsLibrary):
- self.IsLibrary = IsLibrary
-
- def GetIsLibrary(self):
- return self.IsLibrary
-
- def SetIsLibraryModList(self, IsLibraryModList):
- self.IsLibraryModList = IsLibraryModList
-
- def GetIsLibraryModList(self):
- return self.IsLibraryModList
-
- def SetModuleType(self, ModuleType):
- self.ModuleType = ModuleType
-
- def GetModuleType(self):
- return self.ModuleType
-
- def SetBinaryModule(self, BinaryModule):
- self.BinaryModule = BinaryModule
-
- def GetBinaryModule(self):
- return self.BinaryModule
-
- def SetPcdIsDriver(self, PcdIsDriver):
- self.PcdIsDriver = PcdIsDriver
-
- def GetPcdIsDriver(self):
- return self.PcdIsDriver
-
- def SetPiSpecificationVersion(self, PiSpecificationVersion):
- self.PiSpecificationVersion = PiSpecificationVersion
-
- def GetPiSpecificationVersion(self):
- return self.PiSpecificationVersion
-
- def SetUefiSpecificationVersion(self, UefiSpecificationVersion):
- self.UefiSpecificationVersion = UefiSpecificationVersion
-
- def GetUefiSpecificationVersion(self):
- return self.UefiSpecificationVersion
-
- def SetSpecList(self, SpecList):
- self.SpecList = SpecList
-
- def GetSpecList(self):
- return self.SpecList
-
- def SetBootModeList(self, BootModeList):
- self.BootModeList = BootModeList
-
- def GetBootModeList(self):
- return self.BootModeList
-
- def SetEventList(self, EventList):
- self.EventList = EventList
-
- def GetEventList(self):
- return self.EventList
-
- def SetHobList(self, HobList):
- self.HobList = HobList
-
- def GetHobList(self):
- return self.HobList
-
- def SetLibraryClassList(self, LibraryClassList):
- self.LibraryClassList = LibraryClassList
-
- def GetLibraryClassList(self):
- return self.LibraryClassList
-
- def SetSupArchList(self, SupArchList):
- self.SupArchList = SupArchList
-
- def GetSupArchList(self):
- return self.SupArchList
-
- def SetModuleUniFile(self, ModuleUniFile):
- self.ModuleUniFile = ModuleUniFile
-
- def GetModuleUniFile(self):
- return self.ModuleUniFile
-##
-# SourceFileObject
-#
-class SourceFileObject(CommonPropertiesObject):
- def __init__(self):
- CommonPropertiesObject.__init__(self)
- self.SourceFile = ''
- self.TagName = ''
- self.ToolCode = ''
- self.Family = ''
- self.FileType = ''
-
- def SetSourceFile(self, SourceFile):
- self.SourceFile = SourceFile
-
- def GetSourceFile(self):
- return self.SourceFile
-
- def SetTagName(self, TagName):
- self.TagName = TagName
-
- def GetTagName(self):
- return self.TagName
-
- def SetToolCode(self, ToolCode):
- self.ToolCode = ToolCode
-
- def GetToolCode(self):
- return self.ToolCode
-
- def SetFamily(self, Family):
- self.Family = Family
-
- def GetFamily(self):
- return self.Family
-
- def SetFileType(self, FileType):
- self.FileType = FileType
-
- def GetFileType(self):
- return self.FileType
-
-
-##
-# BinaryFileObject
-#
-class BinaryFileObject(CommonPropertiesObject):
- def __init__(self):
- self.FileNamList = []
- self.AsBuiltList = []
- CommonPropertiesObject.__init__(self)
-
- def SetFileNameList(self, FileNamList):
- self.FileNamList = FileNamList
-
- def GetFileNameList(self):
- return self.FileNamList
-
- def SetAsBuiltList(self, AsBuiltList):
- self.AsBuiltList = AsBuiltList
-
- def GetAsBuiltList(self):
- return self.AsBuiltList
-
-
-##
-# AsBuildLibraryClassObject
-#
-class AsBuildLibraryClassObject(object):
- def __init__(self):
- self.LibGuid = ''
- self.LibVersion = ''
- self.SupArchList = []
-
- def SetLibGuid(self, LibGuid):
- self.LibGuid = LibGuid
- def GetLibGuid(self):
- return self.LibGuid
-
- def SetLibVersion(self, LibVersion):
- self.LibVersion = LibVersion
- def GetLibVersion(self):
- return self.LibVersion
-
- def SetSupArchList(self, SupArchList):
- self.SupArchList = SupArchList
- def GetSupArchList(self):
- return self.SupArchList
-
-##
-# AsBuiltObject
-#
-class AsBuiltObject(object):
- def __init__(self):
- #
- # list of PcdObject
- #
- self.PatchPcdList = []
- #
- # list of PcdObject
- #
- self.PcdExValueList = []
- #
- # list of GuidVersionObject
- #
- self.LibraryInstancesList = []
- #
- # List of BinaryBuildFlag object
- #
- self.BinaryBuildFlagList = []
-
- def SetPatchPcdList(self, PatchPcdList):
- self.PatchPcdList = PatchPcdList
-
- def GetPatchPcdList(self):
- return self.PatchPcdList
-
- def SetPcdExList(self, PcdExValueList):
- self.PcdExValueList = PcdExValueList
-
- def GetPcdExList(self):
- return self.PcdExValueList
-
- def SetLibraryInstancesList(self, LibraryInstancesList):
- self.LibraryInstancesList = LibraryInstancesList
-
- def GetLibraryInstancesList(self):
- return self.LibraryInstancesList
-
- def SetBuildFlagsList(self, BinaryBuildFlagList):
- self.BinaryBuildFlagList = BinaryBuildFlagList
-
- def GetBuildFlagsList(self):
- return self.BinaryBuildFlagList
-
-##
-# BinaryBuildFlag, this object will include those fields that are not
-# covered by the UPT Spec BinaryFile field
-#
-class BinaryBuildFlagObject(object):
- def __init__(self):
- self.Target = ''
- self.TagName = ''
- self.Family = ''
- self.AsBuiltOptionFlags = ''
-
- def SetTarget(self, Target):
- self.Target = Target
-
- def GetTarget(self):
- return self.Target
-
- def SetTagName(self, TagName):
- self.TagName = TagName
-
- def GetTagName(self):
- return self.TagName
-
- def SetFamily(self, Family):
- self.Family = Family
-
- def GetFamily(self):
- return self.Family
-
- def SetAsBuiltOptionFlags(self, AsBuiltOptionFlags):
- self.AsBuiltOptionFlags = AsBuiltOptionFlags
- def GetAsBuiltOptionFlags(self):
- return self.AsBuiltOptionFlags
-
-##
-# ExternObject
-#
-class ExternObject(CommonPropertiesObject):
- def __init__(self):
- self.EntryPoint = ''
- self.UnloadImage = ''
- self.Constructor = ''
- self.Destructor = ''
- self.SupModList = []
- CommonPropertiesObject.__init__(self)
-
- def SetEntryPoint(self, EntryPoint):
- self.EntryPoint = EntryPoint
-
- def GetEntryPoint(self):
- return self.EntryPoint
-
- def SetUnloadImage(self, UnloadImage):
- self.UnloadImage = UnloadImage
-
- def GetUnloadImage(self):
- return self.UnloadImage
-
- def SetConstructor(self, Constructor):
- self.Constructor = Constructor
-
- def GetConstructor(self):
- return self.Constructor
-
- def SetDestructor(self, Destructor):
- self.Destructor = Destructor
-
- def GetDestructor(self):
- return self.Destructor
-
- def SetSupModList(self, SupModList):
- self.SupModList = SupModList
- def GetSupModList(self):
- return self.SupModList
-
-##
-# DepexObject
-#
-class DepexObject(CommonPropertiesObject):
- def __init__(self):
- self.Depex = ''
- self.ModuelType = ''
- CommonPropertiesObject.__init__(self)
-
- def SetDepex(self, Depex):
- self.Depex = Depex
-
- def GetDepex(self):
- return self.Depex
-
- def SetModuleType(self, ModuleType):
- self.ModuelType = ModuleType
-
- def GetModuleType(self):
- return self.ModuelType
-
-##
-# PackageDependencyObject
-#
-class PackageDependencyObject(GuidVersionObject, CommonPropertiesObject):
- def __init__(self):
- self.Package = ''
- self.PackageFilePath = ''
- GuidVersionObject.__init__(self)
- CommonPropertiesObject.__init__(self)
-
- def SetPackageFilePath(self, PackageFilePath):
- self.PackageFilePath = PackageFilePath
-
- def GetPackageFilePath(self):
- return self.PackageFilePath
-
- def SetPackage(self, Package):
- self.Package = Package
-
- def GetPackage(self):
- return self.Package
-
-##
-# BuildOptionObject
-#
-class BuildOptionObject(CommonPropertiesObject):
- def __init__(self):
- CommonPropertiesObject.__init__(self)
- self.BuildOption = ''
-
- def SetBuildOption(self, BuildOption):
- self.BuildOption = BuildOption
-
- def GetBuildOption(self):
- return self.BuildOption
-
-##
-# ModuleObject
-#
-class ModuleObject(ModuleHeaderObject):
- def __init__(self):
- #
- # {Arch : ModuleHeaderObject}
- #
- self.HeaderDict = {}
- #
- # LibraryClassObject
- #
- self.LibraryClassList = []
- #
- # SourceFileObject
- #
- self.SourceFileList = []
- #
- # BinaryFileObject
- #
- self.BinaryFileList = []
- #
- # PackageDependencyObject
- #
- self.PackageDependencyList = []
- #
- # DepexObject
- #
- self.PeiDepex = []
- #
- # DepexObject
- #
- self.DxeDepex = []
- #
- # DepexObject
- #
- self.SmmDepex = []
- #
- # ProtocolObject
- #
- self.ProtocolList = []
- #
- # PpiObject
- #
- self.PpiList = []
- #
- # GuidObject
- #
- self.GuidList = []
- #
- # PcdObject
- #
- self.PcdList = []
- #
- # ExternObject
- #
- self.ExternList = []
- #
- # BuildOptionObject
- #
- self.BuildOptionList = []
- #
- # UserExtensionObject
- #
- self.UserExtensionList = []
- #
- # MiscFileObject
- #
- self.MiscFileList = []
- #
- # ClonedFromObject
- #
- self.ClonedFrom = None
-
- ModuleHeaderObject.__init__(self)
-
- def SetHeaderDict(self, HeaderDict):
- self.HeaderDict = HeaderDict
-
- def GetHeaderDict(self):
- return self.HeaderDict
-
- def SetLibraryClassList(self, LibraryClassList):
- self.LibraryClassList = LibraryClassList
-
- def GetLibraryClassList(self):
- return self.LibraryClassList
-
- def SetSourceFileList(self, SourceFileList):
- self.SourceFileList = SourceFileList
-
- def GetSourceFileList(self):
- return self.SourceFileList
-
- def SetBinaryFileList(self, BinaryFileList):
- self.BinaryFileList = BinaryFileList
-
- def GetBinaryFileList(self):
- return self.BinaryFileList
-
- def SetPackageDependencyList(self, PackageDependencyList):
- self.PackageDependencyList = PackageDependencyList
-
- def GetPackageDependencyList(self):
- return self.PackageDependencyList
-
- def SetPeiDepex(self, PeiDepex):
- self.PeiDepex = PeiDepex
-
- def GetPeiDepex(self):
- return self.PeiDepex
-
- def SetDxeDepex(self, DxeDepex):
- self.DxeDepex = DxeDepex
-
- def GetDxeDepex(self):
- return self.DxeDepex
-
- def SetSmmDepex(self, SmmDepex):
- self.SmmDepex = SmmDepex
-
- def GetSmmDepex(self):
- return self.SmmDepex
-
- def SetPpiList(self, PpiList):
- self.PpiList = PpiList
-
- def GetPpiList(self):
- return self.PpiList
-
- def SetProtocolList(self, ProtocolList):
- self.ProtocolList = ProtocolList
-
- def GetProtocolList(self):
- return self.ProtocolList
-
- def SetPcdList(self, PcdList):
- self.PcdList = PcdList
-
- def GetPcdList(self):
- return self.PcdList
-
- def SetGuidList(self, GuidList):
- self.GuidList = GuidList
-
- def GetGuidList(self):
- return self.GuidList
-
- def SetExternList(self, ExternList):
- self.ExternList = ExternList
-
- def GetExternList(self):
- return self.ExternList
-
- def SetBuildOptionList(self, BuildOptionList):
- self.BuildOptionList = BuildOptionList
-
- def GetBuildOptionList(self):
- return self.BuildOptionList
-
- def SetUserExtensionList(self, UserExtensionList):
- self.UserExtensionList = UserExtensionList
-
- def GetUserExtensionList(self):
- return self.UserExtensionList
-
- def SetMiscFileList(self, MiscFileList):
- self.MiscFileList = MiscFileList
-
- def GetMiscFileList(self):
- return self.MiscFileList
-
- def SetClonedFrom(self, ClonedFrom):
- self.ClonedFrom = ClonedFrom
-
- def GetClonedFrom(self):
- return self.ClonedFrom
+## @file +# This file is used to define a class object to describe a module +# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent + +''' +ModuleObject +''' + +## +# Import Modules +# +from Object.POM.CommonObject import CommonPropertiesObject +from Object.POM.CommonObject import IdentificationObject +from Object.POM.CommonObject import CommonHeaderObject +from Object.POM.CommonObject import BinaryHeaderObject +from Object.POM.CommonObject import HelpTextListObject +from Object.POM.CommonObject import GuidVersionObject + + +## +# BootModeObject +# +class BootModeObject(CommonPropertiesObject, HelpTextListObject): + def __init__(self): + self.SupportedBootModes = '' + CommonPropertiesObject.__init__(self) + HelpTextListObject.__init__(self) + + def SetSupportedBootModes(self, SupportedBootModes): + self.SupportedBootModes = SupportedBootModes + + def GetSupportedBootModes(self): + return self.SupportedBootModes + +## +# EventObject +# +class EventObject(CommonPropertiesObject, HelpTextListObject): + def __init__(self): + self.EventType = '' + CommonPropertiesObject.__init__(self) + HelpTextListObject.__init__(self) + + def SetEventType(self, EventType): + self.EventType = EventType + + def GetEventType(self): + return self.EventType + +## +# HobObject +# +class HobObject(CommonPropertiesObject, HelpTextListObject): + def __init__(self): + self.HobType = '' + CommonPropertiesObject.__init__(self) + HelpTextListObject.__init__(self) + + def SetHobType(self, HobType): + self.HobType = HobType + + def GetHobType(self): + return self.HobType + +## +# SpecObject +# +class SpecObject(object): + def __init__(self): + self.Spec = '' + self.Version = '' + + def SetSpec(self, Spec): + self.Spec = Spec + + def GetSpec(self): + return self.Spec + + def SetVersion(self, Version): + self.Version = Version + + def GetVersion(self): + return self.Version + +## ModuleHeaderObject +# +# This class defined header items used in Module file +# +class ModuleHeaderObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject): + def __init__(self): + self.IsLibrary = False + self.IsLibraryModList = [] + self.ModuleType = '' + self.BinaryModule = False + self.PcdIsDriver = '' + self.PiSpecificationVersion = '' + self.UefiSpecificationVersion = '' + self.UNIFlag = False + self.ModuleUniFile = '' + # + # SpecObject + # + self.SpecList = [] + # + # BootModeObject + # + self.BootModeList = [] + # + # EventObject + # + self.EventList = [] + # + # HobObject + # + self.HobList = [] + # + # LibraryClassObject + # + self.LibraryClassList = [] + self.SupArchList = [] + IdentificationObject.__init__(self) + CommonHeaderObject.__init__(self) + BinaryHeaderObject.__init__(self) + + def SetIsLibrary(self, IsLibrary): + self.IsLibrary = IsLibrary + + def GetIsLibrary(self): + return self.IsLibrary + + def SetIsLibraryModList(self, IsLibraryModList): + self.IsLibraryModList = IsLibraryModList + + def GetIsLibraryModList(self): + return self.IsLibraryModList + + def SetModuleType(self, ModuleType): + self.ModuleType = ModuleType + + def GetModuleType(self): + return self.ModuleType + + def SetBinaryModule(self, BinaryModule): + self.BinaryModule = BinaryModule + + def GetBinaryModule(self): + return self.BinaryModule + + def SetPcdIsDriver(self, PcdIsDriver): + self.PcdIsDriver = PcdIsDriver + + def GetPcdIsDriver(self): + return self.PcdIsDriver + + def SetPiSpecificationVersion(self, PiSpecificationVersion): + self.PiSpecificationVersion = PiSpecificationVersion + + def GetPiSpecificationVersion(self): + return self.PiSpecificationVersion + + def SetUefiSpecificationVersion(self, UefiSpecificationVersion): + self.UefiSpecificationVersion = UefiSpecificationVersion + + def GetUefiSpecificationVersion(self): + return self.UefiSpecificationVersion + + def SetSpecList(self, SpecList): + self.SpecList = SpecList + + def GetSpecList(self): + return self.SpecList + + def SetBootModeList(self, BootModeList): + self.BootModeList = BootModeList + + def GetBootModeList(self): + return self.BootModeList + + def SetEventList(self, EventList): + self.EventList = EventList + + def GetEventList(self): + return self.EventList + + def SetHobList(self, HobList): + self.HobList = HobList + + def GetHobList(self): + return self.HobList + + def SetLibraryClassList(self, LibraryClassList): + self.LibraryClassList = LibraryClassList + + def GetLibraryClassList(self): + return self.LibraryClassList + + def SetSupArchList(self, SupArchList): + self.SupArchList = SupArchList + + def GetSupArchList(self): + return self.SupArchList + + def SetModuleUniFile(self, ModuleUniFile): + self.ModuleUniFile = ModuleUniFile + + def GetModuleUniFile(self): + return self.ModuleUniFile +## +# SourceFileObject +# +class SourceFileObject(CommonPropertiesObject): + def __init__(self): + CommonPropertiesObject.__init__(self) + self.SourceFile = '' + self.TagName = '' + self.ToolCode = '' + self.Family = '' + self.FileType = '' + + def SetSourceFile(self, SourceFile): + self.SourceFile = SourceFile + + def GetSourceFile(self): + return self.SourceFile + + def SetTagName(self, TagName): + self.TagName = TagName + + def GetTagName(self): + return self.TagName + + def SetToolCode(self, ToolCode): + self.ToolCode = ToolCode + + def GetToolCode(self): + return self.ToolCode + + def SetFamily(self, Family): + self.Family = Family + + def GetFamily(self): + return self.Family + + def SetFileType(self, FileType): + self.FileType = FileType + + def GetFileType(self): + return self.FileType + + +## +# BinaryFileObject +# +class BinaryFileObject(CommonPropertiesObject): + def __init__(self): + self.FileNamList = [] + self.AsBuiltList = [] + CommonPropertiesObject.__init__(self) + + def SetFileNameList(self, FileNamList): + self.FileNamList = FileNamList + + def GetFileNameList(self): + return self.FileNamList + + def SetAsBuiltList(self, AsBuiltList): + self.AsBuiltList = AsBuiltList + + def GetAsBuiltList(self): + return self.AsBuiltList + + +## +# AsBuildLibraryClassObject +# +class AsBuildLibraryClassObject(object): + def __init__(self): + self.LibGuid = '' + self.LibVersion = '' + self.SupArchList = [] + + def SetLibGuid(self, LibGuid): + self.LibGuid = LibGuid + def GetLibGuid(self): + return self.LibGuid + + def SetLibVersion(self, LibVersion): + self.LibVersion = LibVersion + def GetLibVersion(self): + return self.LibVersion + + def SetSupArchList(self, SupArchList): + self.SupArchList = SupArchList + def GetSupArchList(self): + return self.SupArchList + +## +# AsBuiltObject +# +class AsBuiltObject(object): + def __init__(self): + # + # list of PcdObject + # + self.PatchPcdList = [] + # + # list of PcdObject + # + self.PcdExValueList = [] + # + # list of GuidVersionObject + # + self.LibraryInstancesList = [] + # + # List of BinaryBuildFlag object + # + self.BinaryBuildFlagList = [] + + def SetPatchPcdList(self, PatchPcdList): + self.PatchPcdList = PatchPcdList + + def GetPatchPcdList(self): + return self.PatchPcdList + + def SetPcdExList(self, PcdExValueList): + self.PcdExValueList = PcdExValueList + + def GetPcdExList(self): + return self.PcdExValueList + + def SetLibraryInstancesList(self, LibraryInstancesList): + self.LibraryInstancesList = LibraryInstancesList + + def GetLibraryInstancesList(self): + return self.LibraryInstancesList + + def SetBuildFlagsList(self, BinaryBuildFlagList): + self.BinaryBuildFlagList = BinaryBuildFlagList + + def GetBuildFlagsList(self): + return self.BinaryBuildFlagList + +## +# BinaryBuildFlag, this object will include those fields that are not +# covered by the UPT Spec BinaryFile field +# +class BinaryBuildFlagObject(object): + def __init__(self): + self.Target = '' + self.TagName = '' + self.Family = '' + self.AsBuiltOptionFlags = '' + + def SetTarget(self, Target): + self.Target = Target + + def GetTarget(self): + return self.Target + + def SetTagName(self, TagName): + self.TagName = TagName + + def GetTagName(self): + return self.TagName + + def SetFamily(self, Family): + self.Family = Family + + def GetFamily(self): + return self.Family + + def SetAsBuiltOptionFlags(self, AsBuiltOptionFlags): + self.AsBuiltOptionFlags = AsBuiltOptionFlags + def GetAsBuiltOptionFlags(self): + return self.AsBuiltOptionFlags + +## +# ExternObject +# +class ExternObject(CommonPropertiesObject): + def __init__(self): + self.EntryPoint = '' + self.UnloadImage = '' + self.Constructor = '' + self.Destructor = '' + self.SupModList = [] + CommonPropertiesObject.__init__(self) + + def SetEntryPoint(self, EntryPoint): + self.EntryPoint = EntryPoint + + def GetEntryPoint(self): + return self.EntryPoint + + def SetUnloadImage(self, UnloadImage): + self.UnloadImage = UnloadImage + + def GetUnloadImage(self): + return self.UnloadImage + + def SetConstructor(self, Constructor): + self.Constructor = Constructor + + def GetConstructor(self): + return self.Constructor + + def SetDestructor(self, Destructor): + self.Destructor = Destructor + + def GetDestructor(self): + return self.Destructor + + def SetSupModList(self, SupModList): + self.SupModList = SupModList + def GetSupModList(self): + return self.SupModList + +## +# DepexObject +# +class DepexObject(CommonPropertiesObject): + def __init__(self): + self.Depex = '' + self.ModuelType = '' + CommonPropertiesObject.__init__(self) + + def SetDepex(self, Depex): + self.Depex = Depex + + def GetDepex(self): + return self.Depex + + def SetModuleType(self, ModuleType): + self.ModuelType = ModuleType + + def GetModuleType(self): + return self.ModuelType + +## +# PackageDependencyObject +# +class PackageDependencyObject(GuidVersionObject, CommonPropertiesObject): + def __init__(self): + self.Package = '' + self.PackageFilePath = '' + GuidVersionObject.__init__(self) + CommonPropertiesObject.__init__(self) + + def SetPackageFilePath(self, PackageFilePath): + self.PackageFilePath = PackageFilePath + + def GetPackageFilePath(self): + return self.PackageFilePath + + def SetPackage(self, Package): + self.Package = Package + + def GetPackage(self): + return self.Package + +## +# BuildOptionObject +# +class BuildOptionObject(CommonPropertiesObject): + def __init__(self): + CommonPropertiesObject.__init__(self) + self.BuildOption = '' + + def SetBuildOption(self, BuildOption): + self.BuildOption = BuildOption + + def GetBuildOption(self): + return self.BuildOption + +## +# ModuleObject +# +class ModuleObject(ModuleHeaderObject): + def __init__(self): + # + # {Arch : ModuleHeaderObject} + # + self.HeaderDict = {} + # + # LibraryClassObject + # + self.LibraryClassList = [] + # + # SourceFileObject + # + self.SourceFileList = [] + # + # BinaryFileObject + # + self.BinaryFileList = [] + # + # PackageDependencyObject + # + self.PackageDependencyList = [] + # + # DepexObject + # + self.PeiDepex = [] + # + # DepexObject + # + self.DxeDepex = [] + # + # DepexObject + # + self.SmmDepex = [] + # + # ProtocolObject + # + self.ProtocolList = [] + # + # PpiObject + # + self.PpiList = [] + # + # GuidObject + # + self.GuidList = [] + # + # PcdObject + # + self.PcdList = [] + # + # ExternObject + # + self.ExternList = [] + # + # BuildOptionObject + # + self.BuildOptionList = [] + # + # UserExtensionObject + # + self.UserExtensionList = [] + # + # MiscFileObject + # + self.MiscFileList = [] + # + # ClonedFromObject + # + self.ClonedFrom = None + + ModuleHeaderObject.__init__(self) + + def SetHeaderDict(self, HeaderDict): + self.HeaderDict = HeaderDict + + def GetHeaderDict(self): + return self.HeaderDict + + def SetLibraryClassList(self, LibraryClassList): + self.LibraryClassList = LibraryClassList + + def GetLibraryClassList(self): + return self.LibraryClassList + + def SetSourceFileList(self, SourceFileList): + self.SourceFileList = SourceFileList + + def GetSourceFileList(self): + return self.SourceFileList + + def SetBinaryFileList(self, BinaryFileList): + self.BinaryFileList = BinaryFileList + + def GetBinaryFileList(self): + return self.BinaryFileList + + def SetPackageDependencyList(self, PackageDependencyList): + self.PackageDependencyList = PackageDependencyList + + def GetPackageDependencyList(self): + return self.PackageDependencyList + + def SetPeiDepex(self, PeiDepex): + self.PeiDepex = PeiDepex + + def GetPeiDepex(self): + return self.PeiDepex + + def SetDxeDepex(self, DxeDepex): + self.DxeDepex = DxeDepex + + def GetDxeDepex(self): + return self.DxeDepex + + def SetSmmDepex(self, SmmDepex): + self.SmmDepex = SmmDepex + + def GetSmmDepex(self): + return self.SmmDepex + + def SetPpiList(self, PpiList): + self.PpiList = PpiList + + def GetPpiList(self): + return self.PpiList + + def SetProtocolList(self, ProtocolList): + self.ProtocolList = ProtocolList + + def GetProtocolList(self): + return self.ProtocolList + + def SetPcdList(self, PcdList): + self.PcdList = PcdList + + def GetPcdList(self): + return self.PcdList + + def SetGuidList(self, GuidList): + self.GuidList = GuidList + + def GetGuidList(self): + return self.GuidList + + def SetExternList(self, ExternList): + self.ExternList = ExternList + + def GetExternList(self): + return self.ExternList + + def SetBuildOptionList(self, BuildOptionList): + self.BuildOptionList = BuildOptionList + + def GetBuildOptionList(self): + return self.BuildOptionList + + def SetUserExtensionList(self, UserExtensionList): + self.UserExtensionList = UserExtensionList + + def GetUserExtensionList(self): + return self.UserExtensionList + + def SetMiscFileList(self, MiscFileList): + self.MiscFileList = MiscFileList + + def GetMiscFileList(self): + return self.MiscFileList + + def SetClonedFrom(self, ClonedFrom): + self.ClonedFrom = ClonedFrom + + def GetClonedFrom(self): + return self.ClonedFrom diff --git a/BaseTools/Source/Python/UPT/Object/POM/PackageObject.py b/BaseTools/Source/Python/UPT/Object/POM/PackageObject.py index fcc2a3bea9..9d2db3399a 100644 --- a/BaseTools/Source/Python/UPT/Object/POM/PackageObject.py +++ b/BaseTools/Source/Python/UPT/Object/POM/PackageObject.py @@ -1,192 +1,192 @@ -## @file
-# This file is used to define a class object to describe a package
-#
-# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-
-'''
-PackageObject
-'''
-
-##
-# Import Modules
-#
-from Object.POM.CommonObject import CommonPropertiesObject
-from Object.POM.CommonObject import IdentificationObject
-from Object.POM.CommonObject import CommonHeaderObject
-from Object.POM.CommonObject import BinaryHeaderObject
-from Library.Misc import Sdict
-
-## StandardIncludeFileObject
-#
-class StandardIncludeFileObject(CommonPropertiesObject):
- def __init__(self):
- CommonPropertiesObject.__init__(self)
- self.IncludeFile = ''
-
- def SetIncludeFile(self, IncludeFile):
- self.IncludeFile = IncludeFile
-
- def GetIncludeFile(self):
- return self.IncludeFile
-
-## PackageIncludeFileObject
-#
-class PackageIncludeFileObject(StandardIncludeFileObject):
- pass
-
-##
-# PackageObject
-#
-class PackageObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject):
- def __init__(self):
- IdentificationObject.__init__(self)
- CommonHeaderObject.__init__(self)
- BinaryHeaderObject.__init__(self)
- #
- # LibraryClassObject
- #
- self.LibraryClassList = []
- #
- # FileObject
- #
- self.IncludePathList = []
- #
- # StandardIncludeFileObject
- #
- self.StandardIncludeFileList = []
- #
- # PackageIncludeFileObject
- #
- self.PackageIncludeFileList = []
- #
- # Include and Arch List, item is (IncludePath, SupArchList-List of Arch), used during install package
- #
- self.IncludeArchList = []
- #
- # ProtocolObject
- #
- self.ProtocolList = []
- #
- # PpiObject
- #
- self.PpiList = []
- #
- # GuidObject
- #
- self.GuidList = []
- #
- # (PcdObject, PcdErrorObject)
- #
- self.PcdList = []
- #
- # {(PcdTokenSpaceGuidCName, PcdErrroNumber): PcdErrorMessageList}
- #
- self.PcdErrorCommentDict = {}
- #
- # UserExtensionObject
- #
- self.UserExtensionList = []
- #
- # MiscFileObject
- #
- self.MiscFileList = []
- self.ModuleDict = Sdict()
- #
- # ClonedRecordObject
- #
- self.ClonedFromList = []
- #
- # string object
- #
- self.ModuleFileList = []
-
- self.PcdChecks = []
-
- self.UNIFlag = False
-
- def SetLibraryClassList(self, LibraryClassList):
- self.LibraryClassList = LibraryClassList
-
- def GetLibraryClassList(self):
- return self.LibraryClassList
-
- def SetIncludePathList(self, IncludePathList):
- self.IncludePathList = IncludePathList
-
- def GetIncludePathList(self):
- return self.IncludePathList
-
- def SetIncludeArchList(self, IncludeArchList):
- self.IncludeArchList = IncludeArchList
-
- def GetIncludeArchList(self):
- return self.IncludeArchList
-
- def SetStandardIncludeFileList(self, StandardIncludeFileList):
- self.StandardIncludeFileList = StandardIncludeFileList
-
- def GetStandardIncludeFileList(self):
- return self.StandardIncludeFileList
-
- def SetPackageIncludeFileList(self, PackageIncludeFileList):
- self.PackageIncludeFileList = PackageIncludeFileList
-
- def GetPackageIncludeFileList(self):
- return self.PackageIncludeFileList
-
- def SetProtocolList(self, ProtocolList):
- self.ProtocolList = ProtocolList
-
- def GetProtocolList(self):
- return self.ProtocolList
-
- def SetPpiList(self, PpiList):
- self.PpiList = PpiList
-
- def GetPpiList(self):
- return self.PpiList
-
- def SetGuidList(self, GuidList):
- self.GuidList = GuidList
-
- def GetGuidList(self):
- return self.GuidList
-
- def SetPcdList(self, PcdList):
- self.PcdList = PcdList
-
- def GetPcdList(self):
- return self.PcdList
-
- def SetUserExtensionList(self, UserExtensionList):
- self.UserExtensionList = UserExtensionList
-
- def GetUserExtensionList(self):
- return self.UserExtensionList
-
- def SetMiscFileList(self, MiscFileList):
- self.MiscFileList = MiscFileList
-
- def GetMiscFileList(self):
- return self.MiscFileList
-
- def SetModuleDict(self, ModuleDict):
- self.ModuleDict = ModuleDict
-
- def GetModuleDict(self):
- return self.ModuleDict
-
- def SetClonedFromList(self, ClonedFromList):
- self.ClonedFromList = ClonedFromList
-
- def GetClonedFromList(self):
- return self.ClonedFromList
-
- def SetModuleFileList(self, ModuleFileList):
- self.ModuleFileList = ModuleFileList
-
- def GetModuleFileList(self):
- return self.ModuleFileList
-
+## @file +# This file is used to define a class object to describe a package +# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent + +''' +PackageObject +''' + +## +# Import Modules +# +from Object.POM.CommonObject import CommonPropertiesObject +from Object.POM.CommonObject import IdentificationObject +from Object.POM.CommonObject import CommonHeaderObject +from Object.POM.CommonObject import BinaryHeaderObject +from Library.Misc import Sdict + +## StandardIncludeFileObject +# +class StandardIncludeFileObject(CommonPropertiesObject): + def __init__(self): + CommonPropertiesObject.__init__(self) + self.IncludeFile = '' + + def SetIncludeFile(self, IncludeFile): + self.IncludeFile = IncludeFile + + def GetIncludeFile(self): + return self.IncludeFile + +## PackageIncludeFileObject +# +class PackageIncludeFileObject(StandardIncludeFileObject): + pass + +## +# PackageObject +# +class PackageObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject): + def __init__(self): + IdentificationObject.__init__(self) + CommonHeaderObject.__init__(self) + BinaryHeaderObject.__init__(self) + # + # LibraryClassObject + # + self.LibraryClassList = [] + # + # FileObject + # + self.IncludePathList = [] + # + # StandardIncludeFileObject + # + self.StandardIncludeFileList = [] + # + # PackageIncludeFileObject + # + self.PackageIncludeFileList = [] + # + # Include and Arch List, item is (IncludePath, SupArchList-List of Arch), used during install package + # + self.IncludeArchList = [] + # + # ProtocolObject + # + self.ProtocolList = [] + # + # PpiObject + # + self.PpiList = [] + # + # GuidObject + # + self.GuidList = [] + # + # (PcdObject, PcdErrorObject) + # + self.PcdList = [] + # + # {(PcdTokenSpaceGuidCName, PcdErrroNumber): PcdErrorMessageList} + # + self.PcdErrorCommentDict = {} + # + # UserExtensionObject + # + self.UserExtensionList = [] + # + # MiscFileObject + # + self.MiscFileList = [] + self.ModuleDict = Sdict() + # + # ClonedRecordObject + # + self.ClonedFromList = [] + # + # string object + # + self.ModuleFileList = [] + + self.PcdChecks = [] + + self.UNIFlag = False + + def SetLibraryClassList(self, LibraryClassList): + self.LibraryClassList = LibraryClassList + + def GetLibraryClassList(self): + return self.LibraryClassList + + def SetIncludePathList(self, IncludePathList): + self.IncludePathList = IncludePathList + + def GetIncludePathList(self): + return self.IncludePathList + + def SetIncludeArchList(self, IncludeArchList): + self.IncludeArchList = IncludeArchList + + def GetIncludeArchList(self): + return self.IncludeArchList + + def SetStandardIncludeFileList(self, StandardIncludeFileList): + self.StandardIncludeFileList = StandardIncludeFileList + + def GetStandardIncludeFileList(self): + return self.StandardIncludeFileList + + def SetPackageIncludeFileList(self, PackageIncludeFileList): + self.PackageIncludeFileList = PackageIncludeFileList + + def GetPackageIncludeFileList(self): + return self.PackageIncludeFileList + + def SetProtocolList(self, ProtocolList): + self.ProtocolList = ProtocolList + + def GetProtocolList(self): + return self.ProtocolList + + def SetPpiList(self, PpiList): + self.PpiList = PpiList + + def GetPpiList(self): + return self.PpiList + + def SetGuidList(self, GuidList): + self.GuidList = GuidList + + def GetGuidList(self): + return self.GuidList + + def SetPcdList(self, PcdList): + self.PcdList = PcdList + + def GetPcdList(self): + return self.PcdList + + def SetUserExtensionList(self, UserExtensionList): + self.UserExtensionList = UserExtensionList + + def GetUserExtensionList(self): + return self.UserExtensionList + + def SetMiscFileList(self, MiscFileList): + self.MiscFileList = MiscFileList + + def GetMiscFileList(self): + return self.MiscFileList + + def SetModuleDict(self, ModuleDict): + self.ModuleDict = ModuleDict + + def GetModuleDict(self): + return self.ModuleDict + + def SetClonedFromList(self, ClonedFromList): + self.ClonedFromList = ClonedFromList + + def GetClonedFromList(self): + return self.ClonedFromList + + def SetModuleFileList(self, ModuleFileList): + self.ModuleFileList = ModuleFileList + + def GetModuleFileList(self): + return self.ModuleFileList + diff --git a/BaseTools/Source/Python/UPT/Object/POM/__init__.py b/BaseTools/Source/Python/UPT/Object/POM/__init__.py index b36e7f6585..7f07f89fd1 100644 --- a/BaseTools/Source/Python/UPT/Object/POM/__init__.py +++ b/BaseTools/Source/Python/UPT/Object/POM/__init__.py @@ -1,14 +1,14 @@ -## @file
-# Python 'Object' package initialization file.
-#
-# This file is required to make Python interpreter treat the directory
-# as containing package.
-#
-# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-
-'''
-POM
-'''
+## @file +# Python 'Object' package initialization file. +# +# This file is required to make Python interpreter treat the directory +# as containing package. +# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +''' +POM +''' |
