]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/CommonDataClass/PackageClass.py
2 # This file is used to define a class object to describe a package
4 # Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
5 # This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 from CommonClass
import *
17 from Common
.Misc
import sdict
21 # This class defined header items used in Package file
23 # @param IdentificationClass: Inherited from IdentificationClass class
24 # @param CommonHeaderClass: Inherited from CommonHeaderClass class
26 # @var DecSpecification: To store value for DecSpecification
27 # @var ReadOnly: To store value for ReadOnly
28 # @var RePackage: To store value for RePackage
29 # @var ClonedFrom: To store value for ClonedFrom, it is a set structure as
30 # [ ClonedRecordClass, ...]
32 class PackageHeaderClass(IdentificationClass
, CommonHeaderClass
):
34 IdentificationClass
.__init
__(self
)
35 CommonHeaderClass
.__init
__(self
)
36 self
.DecSpecification
= ''
38 self
.RePackage
= False
42 ## PackageIndustryStdHeaderClass
44 # This class defined industry std header items used in Package file
46 # @param CommonHeaderClass: Inherited from CommonHeaderClass class
48 # @var Name: To store value for Name
49 # @var IncludeHeader: To store value for IncludeHeader
51 class PackageIndustryStdHeaderClass(CommonClass
):
54 self
.IncludeHeader
= ''
55 CommonClass
.__init
__(self
)
57 ## PackageIncludePkgHeaderClass
59 # This class defined include Pkg header items used in Package file
61 # @param object: Inherited from object class
63 # @var IncludeHeader: To store value for IncludeHeader
64 # @var ModuleType: To store value for ModuleType, it is a set structure as
65 # BASE | SEC | PEI_CORE | PEIM | DXE_CORE | DXE_DRIVER | DXE_RUNTIME_DRIVER | DXE_SAL_DRIVER | DXE_SMM_DRIVER | TOOL | UEFI_DRIVER | UEFI_APPLICATION | USER_DEFINED | SMM_CORE
67 class PackageIncludePkgHeaderClass(object):
69 self
.IncludeHeader
= ''
74 # This class defined a complete package item
76 # @param object: Inherited from object class
78 # @var Header: To store value for Header, it is a structure as
79 # {Arch : PackageHeaderClass}
80 # @var Includes: To store value for Includes, it is a list structure as
81 # [ IncludeClass, ...]
82 # @var LibraryClassDeclarations: To store value for LibraryClassDeclarations, it is a list structure as
83 # [ LibraryClassClass, ...]
84 # @var IndustryStdHeaders: To store value for IndustryStdHeaders, it is a list structure as
85 # [ PackageIndustryStdHeader, ...]
86 # @var ModuleFiles: To store value for ModuleFiles, it is a list structure as
88 # @var PackageIncludePkgHeaders: To store value for PackageIncludePkgHeaders, it is a list structure as
89 # [ PackageIncludePkgHeader, ...]
90 # @var GuidDeclarations: To store value for GuidDeclarations, it is a list structure as
92 # @var ProtocolDeclarations: To store value for ProtocolDeclarations, it is a list structure as
93 # [ ProtocolClass, ...]
94 # @var PpiDeclarations: To store value for PpiDeclarations, it is a list structure as
96 # @var PcdDeclarations: To store value for PcdDeclarations, it is a list structure as
98 # @var UserExtensions: To store value for UserExtensions, it is a list structure as
99 # [ UserExtensionsClass, ...]
101 class PackageClass(object):
103 self
.PackageHeader
= PackageHeaderClass()
106 self
.LibraryClassDeclarations
= []
107 self
.IndustryStdHeaders
= []
108 self
.ModuleFiles
= []
109 # {[Guid, Value, Path(relative to WORKSPACE)]: ModuleClassObj}
110 self
.Modules
= sdict()
111 self
.PackageIncludePkgHeaders
= []
112 self
.GuidDeclarations
= []
113 self
.ProtocolDeclarations
= []
114 self
.PpiDeclarations
= []
115 self
.PcdDeclarations
= []
117 self
.UserExtensions
= UserExtensionsClass()
118 self
.MiscFiles
= MiscFileClass()
123 # This acts like the main() function for the script, unless it is 'import'ed into another
126 if __name__
== '__main__':