From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4D631226612AA for ; Wed, 25 Apr 2018 01:51:59 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Apr 2018 01:51:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,325,1520924400"; d="scan'208";a="49773340" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 25 Apr 2018 01:51:58 -0700 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Apr 2018 01:51:57 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 25 Apr 2018 01:51:57 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.210]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.240]) with mapi id 14.03.0319.002; Wed, 25 Apr 2018 16:51:55 +0800 From: "Zhu, Yonghong" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Zhu, Yonghong" Thread-Topic: [PATCH v1 27/27] BaseTools: CommonClass - remove unused classes Thread-Index: AQHT2L+LG1SgKEn+CU2Rzj0MSq14UaQRM9Aw Date: Wed, 25 Apr 2018 08:51:55 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v1 27/27] BaseTools: CommonClass - remove unused classes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 08:51:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Yonghong Zhu =20 Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben=20 Sent: Friday, April 20, 2018 11:52 PM To: edk2-devel@lists.01.org Cc: Gao, Liming ; Zhu, Yonghong Subject: [PATCH v1 27/27] BaseTools: CommonClass - remove unused classes CommonDataClass/CommonClass has only 1 used class: SkuInfoClass remove all = unused classes Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/CommonDataClass/CommonClass.py | 397 +------------= ------- 1 file changed, 1 insertion(+), 396 deletions(-) diff --git a/BaseTools/Source/Python/CommonDataClass/CommonClass.py b/BaseT= ools/Source/Python/CommonDataClass/CommonClass.py index 6a8262e5e964..e29f5211d5c7 100644 --- a/BaseTools/Source/Python/CommonDataClass/CommonClass.py +++ b/BaseTools/Source/Python/CommonDataClass/CommonClass.py @@ -1,7 +1,7 @@ ## @file # This file is used to define common items of class object # -# Copyright= (c) 2007 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights=20 +reserved.
# This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may= be found at @@ -11,240 +11,6 @@ # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. =20 =20 -# -# Generate help text -# -def GenerateHelpText(Text, Lang): - if Text: - Ht =3D HelpTextClass() - Ht.Lang =3D Lang - Ht.String =3D Text - =20 - return Ht - =20 - return None - -## CommonClass -# -# This class defined common items used in Module/Platform/Package files -#= =20 -# @param object: Inherited from object class -# @param Usage: Input value for Usage, default is []=20 -# @param FeatureFlag: Input value for FeatureFalg, default is '' -# @param SupArchList: Input value for SupArchList, default is [] -# @param HelpText: Input value for HelpText, default is '' -# -# @var Usage: To store value for Usage, selection scope is in bel= ow list -# ALWAYS_CONSUMED | SOMETIMES_CONSUMED | ALWAYS_PRODU= CED | SOMETIMES_PRODUCED | TO_START | BY_START | PRIVATE -# @var FeatureFlag: To store value for FeatureFlag -# @var SupArchList: To store value for SupArchList, selection scope is = in below list -# EBC | IA32 | X64 | IPF | ARM | PPC | AARCH64 -# @var HelpText: To store value for HelpText -# -class CommonClass(object): - def __init__(self, Usage =3D None, FeatureFlag =3D '', SupArchList =3D= None, HelpText =3D ''): - self.Usage =3D Usage - if self.Usage is None: - self.Usage =3D [] - self.FeatureFlag =3D FeatureFlag - self.SupArchList =3D SupArchList - if self.SupArchList is None: - self.SupArchList =3D [] - self.HelpText =3D HelpText - self.HelpTextList =3D [] - -## CommonHeaderClass -# -# This class defined common items used in Module/Platform/Package files -#= =20 -# @param object: Inherited from object class -# -# @var Abstract: To store value for Abstract -# @var Description: To store value for Description -# @var Copyright: To store value for Copyright -# @var License: To store value for License -# @var Specification: To store value for Specification -# -class CommonHeaderClass(object): - def __init__(self): - self.Abstract =3D '' - self.Description =3D '' - self.Copyright =3D '' - self.License =3D '' - self.Specification =3D {} - -## HelpTextClass -# -# This class defined HelpText item used in PKG file -#=20 -# @param object: Inherited from object class -# -# @var Lang: To store value for Lang -# @var String: To store value for String -# -class HelpTextClass(object): - def __init__(self): - self.Lang =3D '' - self.String =3D '' - =20 -## DefineClass -# -# This class defined item DEFINE used in Module/Platform/Package files -# = -# @param object: Inherited from object class -# -# @var Define: To store value for Define, it is a set structure as -# { (DefineName, Arch) : DefineValue, ... } -# -class DefineClass(object): - def __init__(self): - self.Define =3D {} - -## ClonedRecordClass -# -# This class defined ClonedRecord items used in Module/Platform/Package fi= les -#=20 -# @param object: Inherited from object class -# -# @var Id: To store value for Id -# @var FarGuid: To store value for FarGuid -# @var PackageGuid: To store value for PackageGuid -# @var PackageVersion: To store value for PackageVersion -# @var ModuleGuid: To store value for ModuleGuid -# @var ModuleVersion: To store value for ModuleVersion -# -class ClonedRecordClass(object): - def __init__(self): - self.Id =3D 0 - self.FarGuid =3D '' - self.PackageGuid =3D '' - self.PackageVersion =3D '' - self.ModuleGuid =3D '' - self.ModuleVersion =3D '' - -## IdentificationClass -# -# This class defined Identification items used in Module/Platform/Package = files -# -# @param object: Inherited from object class -# -# @var Name: To store value for Name -# ModuleName(Inf) / PackageName(Dec) / PlatformName(Dsc) -# @var Guid: To store value for Guid -# @var Version: To store value for Version -# @var FileName: To store value for FileName -# @var FullPath: To store = value for FullPath -# -class IdentificationClass(object): - def __init__(self): - self.Name =3D '' - self.BaseName =3D '' - self.Guid =3D '' - self.Version =3D '' - self.FileName =3D '' - self.FullPath =3D '' - self.RelaPath =3D '' - self.PackagePath =3D '' - self.ModulePath =3D '' - self.CombinePath =3D '' - -## IncludeStatementClass -# -# This class defined IncludeFiles item used in Module/Platform/Package fil= es -#=20 -# @param object: Inherited from object class -# -# @var IncludeFiles: To store value for IncludeFiles -# It is a set structure as { IncludeFile : [Arch1, Arc= h2, ...], ... } -# -class IncludeStatementClass(object): - def __init__(self): - self.IncludeFiles =3D {} =20 - -## GuidProtocolPpiCommonClass -# -# This class defined Guid, Protocol and Ppi like items used in Module/Plat= form/Package files -# -# @param CommonClass: Inherited from CommonClass cl= ass -# -# @var Name: To store value for Name -# @var CName: To store value for CName -# @var Guid: To store value for Guid -# @var Notify: To store value for Notify -# @var GuidTypeList: To store value for GuidTypeList, selection scope is= in below list -# DATA_HUB_RECORD | EFI_EVENT | EFI_SYSTEM_CONFIGURAT= ION_TABLE | EFI_VARIABLE | GUID | HII_PACKAGE_LIST | HOB | TOKEN_SPACE_GUID -# @var SupModuleList: To store value for SupModuleList, selection scope i= s in below list -# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVE= R | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRIVER | UE= FI_APPLICATION | USER_DEFINED | SMM_CORE | MM_STANDALONE | MM_CORE_STANDALO= NE -# -class GuidProtocolPpiCommonClass(CommonClass): - def __init__(self): - self.Name =3D '' - self.CName =3D '' - self.Guid =3D '' - self.VariableName =3D '' - self.Notify =3D False - self.GuidTypeList =3D [] - self.GuidTypeLists =3D [] - self.SupModuleList =3D [] =20 - CommonClass.__init__(self) - -## LibraryClassClass -# -# This class defined Library item used in Module/Platform/Package files -#= =20 -# @param CommonClass: Inherited from CommonClass class -# @param DefineClass: Inherited from DefineClass class -# -# @var LibraryClass: To store value for LibraryClass -# @var IncludeHeader: To store value for IncludeHeader -# @var RecommendedInstanceVersion: To store value for RecommendedInstance= Version -# @var RecommendedInstanceGuid: To store value for RecommendedInstance= Guid -# @var RecommendedInstance: To store value for RecommendedInstance= , selection scope is in below list -# DATA_HUB_RECORD | EFI_EVENT | EFI_SYST= EM_CONFIGURATION_TABLE | EFI_VARIABLE | GUID | HII_PACKAGE_LIST | HOB | TOK= EN_SPACE_GUID -# @var SupModuleList: To store value for SupModuleList, sele= ction scope is in below list -# BASE | SEC | PEI_CORE | PEIM | DXE_COR= E | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEF= I_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE | MM_STANDALONE | MM_= CORE_STANDALONE -# -class LibraryClassClass(CommonClass, DefineClass): - def __init__(self): - self.LibraryClass =3D '' - self.IncludeHeader =3D '' - self.RecommendedInstanceVersion =3D '' - self.RecommendedInstanceGuid =3D '' - self.RecommendedInstance =3D '' - self.SupModuleList =3D [] - CommonClass.__init__(self) - DefineClass.__init__(self) - -## GuidClass -# -# This class defined Guid item used in Module/Platform/Package files -# -#= @param GuidProtocolPpiCommonClass: Inherited from GuidProtocolPpiCommonCl= ass class -# -class GuidClass(GuidProtocolPpiCommonClass): - def __init__(self): - GuidProtocolPpiCommonClass.__init__(self) - -## ProtocolClass -# -# This class defined Protocol item used in Module/Platform/Package files -= # -# @param GuidProtocolPpiCommonClass: Inherited from GuidProtocolPpiComm= onClass class -# -class ProtocolClass(GuidProtocolPpiCommonClass): - def __init__(self): - GuidProtocolPpiCommonClass.__init__(self) - -## PpiClass -# -# This class defined Ppi item used in Module/Platform/Package files -# -# = @param GuidProtocolPpiCommonClass: Inherited from GuidProtocolPpiCommonCla= ss class -# -class PpiClass(GuidProtocolPpiCommonClass): =20 - def __init__(self): - GuidProtocolPpiCommonClass.__init__(self) - ## SkuInfoClass # # This class defined SkuInfo item used in Module/Platform/Package files @@= -314,164 +80,3 @@ class SkuInfoClass(object): 'VpdOffset =3D ' + str(self.VpdOffset) + "," + \ 'DefaultValue =3D ' + str(self.DefaultValue) + "," return Rtn -## PcdErrorClass -# -# -# -class PcdErrorClass(object): - def __init__(self): - self.ValidValueList =3D '' - self.ValidValueListLang =3D '' - self.ValidValueRange =3D '' - self.Expression =3D '' - self.ErrorNumber =3D '' - self.ErrorMessage =3D [] - -## PcdClass -# -# This class defined Pcd item used in Module/Platform/Package files -#=20 -# @param CommonClass: Inherited from CommonClass class -# @param CName: Input value for CName, default is '' -# @param Token: Input value for Token, default is '' -# @param TokenSpaceGuidCName: Input value for TokenSpaceGuidCName, defaul= t 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 [= ] -# -# @var CName: To store value for CName -# @var Token: To store value for Token -# @var TokenSpaceGuidCName: To store value for TokenSpaceGuidCName -# @var DatumType: To store value for DatumType, selection sco= pe is in below list -# UINT8 | UINT16 | UINT32 | UINT64 | VOID* | = BOOLEAN=20 -# @var MaxDatumSize: To store value for MaxDatumSize -# @var DefaultValue: To store value for DefaultValue -# @var ItemType: To store value for ItemType, selection scop= e is in below list -# FEATURE_FLAG | FIXED_AT_BUILD | PATCHABLE_I= N_MODULE | DYNAMIC | DYNAMIC_EX -# @var ValidUsage: To store value for ValidUsage, selection sc= ope is in below list -# FEATURE_FLAG | FIXED_AT_BUILD | PATCHABLE_I= N_MODULE | DYNAMIC | DYNAMIC_EX -# @var SkuInfoList: To store value for SkuInfoList -# It is a set structure as { [SkuIdName] : Sk= uInfoClass }=20 -# @var SupModuleList: To store value for SupModuleList, selection= scope is in below list -# BASE | SEC | PEI_CORE | PEIM | DXE_CORE | D= XE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | UEFI_DRI= VER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE | MM_STANDALONE | MM_CORE_= STANDALONE -# -class PcdClass(CommonClass): - def __init__(self, CName =3D '', Token =3D '', TokenSpaceGuidCName =3D= '', DatumType =3D '', MaxDatumSize =3D '', DefaultValue =3D '', ItemType = =3D '', ValidUsage =3D None, SkuInfoList =3D None, SupModuleList =3D None): - self.CName =3D CName - self.Token =3D Token - self.TokenSpaceGuidCName =3D TokenSpaceGuidCName - self.DatumType =3D DatumType - self.MaxDatumSize =3D MaxDatumSize - self.DefaultValue =3D DefaultValue - self.ItemType =3D ItemType - self.ValidUsage =3D ValidUsage - self.PcdItemType =3D '' - self.TokenSpaceGuidValue =3D '' - self.PcdUsage =3D '' - self.PcdCName =3D '' - self.Value =3D '' - self.Offset =3D '' - if self.ValidUsage is None: - self.ValidUsage =3D [] - self.SkuInfoList =3D SkuInfoList - if self.SkuInfoList is None: - self.SkuInfoList =3D {} - self.SupModuleList =3D SupModuleList - if self.SupModuleList is None: - self.SupModuleList =3D [] - CommonClass.__init__(self) - self.PcdErrors =3D [] - -## BuildOptionClass -# -# This class defined BuildOption item used in Module/Platform/Package file= s -# -# @param IncludeStatementClass: Inherited from IncludeStatementClass= class -# @param ToolChainFamily: Input value for ToolChainFamily, default = is '' -# @param ToolChain: Input value for ToolChain, default is '' -# @param Option: Input value for Option, default is '' -# -# @var Statement: To store value for Statement -# It is a string in a special format as "Fa= mily:Target_TagName_Tarch_ToolCode_FLAGS =3D String" -# @var ToolChainFamily: To store value for ToolChainFamily -# @var ToolChain: To store value for ToolChain -# @var Option: To store value for Option -# @var BuildTarget: To store value for BuildTarget -# @var TagName: To store value for TagName -# @var ToolCode: To store value for ToolCode -# @var SupArchList: To store value for SupArchList, selection= scope is in below list -# EBC | IA32 | X64 | IPF | ARM | PPC | AARC= H64 -# -class BuildOptionClass(IncludeStatementClass): - def __init__(self, ToolChainFamily =3D '', ToolChain =3D '', Option = =3D ''): - IncludeStatementClass.__init__(self) - self.Statement =3D '' =20 - self.ToolChainFamily =3D ToolChainFamily - self.ToolChain =3D ToolChain - self.Option =3D Option - self.BuildTarget =3D '' - self.TagName =3D '' - self.ToolCode =3D '' - self.SupArchList =3D [] - -## IncludeClass -# -# This class defined Include item used in Module/Platform/Package files -#= -# @param CommonClass: Inherited from CommonClass class -# -# @var FilePath: To store value for FilePath -# @var ModuleType: To store value for ModuleType -# @var Comment: To store value for Comment -# -class IncludeClass(CommonClass): - def __init__(self): - self.FilePath =3D '' - self.ModuleType =3D '' - self.SupModuleList =3D [] - self.Comment =3D '' - CommonClass.__init__(self) =20 - -## FileClass -# -# -class FileClass(CommonClass): - def __init__(self): - self.Filename =3D '' - self.Executable =3D '' - self.Family =3D '' - self.FileType =3D '' - CommonClass.__init__(self) - =20 - -## MiscFileClass -# -# -class MiscFileClass(CommonHeaderClass): - def __init__(self): - CommonHeaderClass.__init__(self) - self.Name =3D '' - self.Files =3D [] - =20 - -## UserExtensionsClass -# -# This class defined UserExtensions item used in Module/Platform/Package f= iles -#=20 -# @param object: Inherited from object class -# -# @var UserID: To store value for UserID -# @var Identifier: To store value for Identifier -# @var Content: To store value for Content -# =20 -class UserExtensionsClass(object): - def __init__(self): - self.UserID =3D '' - self.Identifier =3D 0 - self.Content =3D '' - self.Defines =3D [] - self.BuildOptions =3D [] -- 2.16.2.windows.1