]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/UPT/Object/POM/PackageObject.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Object / POM / PackageObject.py
1 ## @file
2 # This file is used to define a class object to describe a package
3 #
4 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
5 #
6 # SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 '''
9 PackageObject
10 '''
11
12 ##
13 # Import Modules
14 #
15 from Object.POM.CommonObject import CommonPropertiesObject
16 from Object.POM.CommonObject import IdentificationObject
17 from Object.POM.CommonObject import CommonHeaderObject
18 from Object.POM.CommonObject import BinaryHeaderObject
19 from Library.Misc import Sdict
20
21 ## StandardIncludeFileObject
22 #
23 class StandardIncludeFileObject(CommonPropertiesObject):
24 def __init__(self):
25 CommonPropertiesObject.__init__(self)
26 self.IncludeFile = ''
27
28 def SetIncludeFile(self, IncludeFile):
29 self.IncludeFile = IncludeFile
30
31 def GetIncludeFile(self):
32 return self.IncludeFile
33
34 ## PackageIncludeFileObject
35 #
36 class PackageIncludeFileObject(StandardIncludeFileObject):
37 pass
38
39 ##
40 # PackageObject
41 #
42 class PackageObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject):
43 def __init__(self):
44 IdentificationObject.__init__(self)
45 CommonHeaderObject.__init__(self)
46 BinaryHeaderObject.__init__(self)
47 #
48 # LibraryClassObject
49 #
50 self.LibraryClassList = []
51 #
52 # FileObject
53 #
54 self.IncludePathList = []
55 #
56 # StandardIncludeFileObject
57 #
58 self.StandardIncludeFileList = []
59 #
60 # PackageIncludeFileObject
61 #
62 self.PackageIncludeFileList = []
63 #
64 # Include and Arch List, item is (IncludePath, SupArchList-List of Arch), used during install package
65 #
66 self.IncludeArchList = []
67 #
68 # ProtocolObject
69 #
70 self.ProtocolList = []
71 #
72 # PpiObject
73 #
74 self.PpiList = []
75 #
76 # GuidObject
77 #
78 self.GuidList = []
79 #
80 # (PcdObject, PcdErrorObject)
81 #
82 self.PcdList = []
83 #
84 # {(PcdTokenSpaceGuidCName, PcdErrroNumber): PcdErrorMessageList}
85 #
86 self.PcdErrorCommentDict = {}
87 #
88 # UserExtensionObject
89 #
90 self.UserExtensionList = []
91 #
92 # MiscFileObject
93 #
94 self.MiscFileList = []
95 self.ModuleDict = Sdict()
96 #
97 # ClonedRecordObject
98 #
99 self.ClonedFromList = []
100 #
101 # string object
102 #
103 self.ModuleFileList = []
104
105 self.PcdChecks = []
106
107 self.UNIFlag = False
108
109 def SetLibraryClassList(self, LibraryClassList):
110 self.LibraryClassList = LibraryClassList
111
112 def GetLibraryClassList(self):
113 return self.LibraryClassList
114
115 def SetIncludePathList(self, IncludePathList):
116 self.IncludePathList = IncludePathList
117
118 def GetIncludePathList(self):
119 return self.IncludePathList
120
121 def SetIncludeArchList(self, IncludeArchList):
122 self.IncludeArchList = IncludeArchList
123
124 def GetIncludeArchList(self):
125 return self.IncludeArchList
126
127 def SetStandardIncludeFileList(self, StandardIncludeFileList):
128 self.StandardIncludeFileList = StandardIncludeFileList
129
130 def GetStandardIncludeFileList(self):
131 return self.StandardIncludeFileList
132
133 def SetPackageIncludeFileList(self, PackageIncludeFileList):
134 self.PackageIncludeFileList = PackageIncludeFileList
135
136 def GetPackageIncludeFileList(self):
137 return self.PackageIncludeFileList
138
139 def SetProtocolList(self, ProtocolList):
140 self.ProtocolList = ProtocolList
141
142 def GetProtocolList(self):
143 return self.ProtocolList
144
145 def SetPpiList(self, PpiList):
146 self.PpiList = PpiList
147
148 def GetPpiList(self):
149 return self.PpiList
150
151 def SetGuidList(self, GuidList):
152 self.GuidList = GuidList
153
154 def GetGuidList(self):
155 return self.GuidList
156
157 def SetPcdList(self, PcdList):
158 self.PcdList = PcdList
159
160 def GetPcdList(self):
161 return self.PcdList
162
163 def SetUserExtensionList(self, UserExtensionList):
164 self.UserExtensionList = UserExtensionList
165
166 def GetUserExtensionList(self):
167 return self.UserExtensionList
168
169 def SetMiscFileList(self, MiscFileList):
170 self.MiscFileList = MiscFileList
171
172 def GetMiscFileList(self):
173 return self.MiscFileList
174
175 def SetModuleDict(self, ModuleDict):
176 self.ModuleDict = ModuleDict
177
178 def GetModuleDict(self):
179 return self.ModuleDict
180
181 def SetClonedFromList(self, ClonedFromList):
182 self.ClonedFromList = ClonedFromList
183
184 def GetClonedFromList(self):
185 return self.ClonedFromList
186
187 def SetModuleFileList(self, ModuleFileList):
188 self.ModuleFileList = ModuleFileList
189
190 def GetModuleFileList(self):
191 return self.ModuleFileList
192