• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## @file
2# This file is used to define a class object to describe a package
3#
4# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
5#
6# This program and the accompanying materials are licensed and made available
7# under the terms and conditions of the BSD License which accompanies this
8# distribution. The full text of the license may be found at
9# http://opensource.org/licenses/bsd-license.php
10#
11# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14'''
15PackageObject
16'''
17
18##
19# Import Modules
20#
21from Object.POM.CommonObject import CommonPropertiesObject
22from Object.POM.CommonObject import IdentificationObject
23from Object.POM.CommonObject import CommonHeaderObject
24from Object.POM.CommonObject import BinaryHeaderObject
25from Library.Misc import Sdict
26
27## StandardIncludeFileObject
28#
29class StandardIncludeFileObject(CommonPropertiesObject):
30    def __init__(self):
31        CommonPropertiesObject.__init__(self)
32        self.IncludeFile = ''
33
34    def SetIncludeFile(self, IncludeFile):
35        self.IncludeFile = IncludeFile
36
37    def GetIncludeFile(self):
38        return self.IncludeFile
39
40## PackageIncludeFileObject
41#
42class PackageIncludeFileObject(StandardIncludeFileObject):
43    pass
44
45##
46# PackageObject
47#
48class PackageObject(IdentificationObject, CommonHeaderObject, BinaryHeaderObject):
49    def __init__(self):
50        IdentificationObject.__init__(self)
51        CommonHeaderObject.__init__(self)
52        BinaryHeaderObject.__init__(self)
53        #
54        # LibraryClassObject
55        #
56        self.LibraryClassList = []
57        #
58        # FileObject
59        #
60        self.IncludePathList = []
61        #
62        # StandardIncludeFileObject
63        #
64        self.StandardIncludeFileList = []
65        #
66        # PackageIncludeFileObject
67        #
68        self.PackageIncludeFileList = []
69        #
70        # Include and Arch List, item is (IncludePath, SupArchList-List of Arch), used during install package
71        #
72        self.IncludeArchList = []
73        #
74        # ProtocolObject
75        #
76        self.ProtocolList = []
77        #
78        # PpiObject
79        #
80        self.PpiList = []
81        #
82        # GuidObject
83        #
84        self.GuidList = []
85        #
86        # (PcdObject, PcdErrorObject)
87        #
88        self.PcdList = []
89        #
90        # {(PcdTokenSpaceGuidCName, PcdErrroNumber): PcdErrorMessageList}
91        #
92        self.PcdErrorCommentDict = {}
93        #
94        # UserExtensionObject
95        #
96        self.UserExtensionList = []
97        #
98        # MiscFileObject
99        #
100        self.MiscFileList = []
101        self.ModuleDict = Sdict()
102        #
103        # ClonedRecordObject
104        #
105        self.ClonedFromList = []
106        #
107        # string object
108        #
109        self.ModuleFileList = []
110
111        self.PcdChecks = []
112
113        self.UNIFlag = False
114
115    def SetLibraryClassList(self, LibraryClassList):
116        self.LibraryClassList = LibraryClassList
117
118    def GetLibraryClassList(self):
119        return self.LibraryClassList
120
121    def SetIncludePathList(self, IncludePathList):
122        self.IncludePathList = IncludePathList
123
124    def GetIncludePathList(self):
125        return self.IncludePathList
126
127    def SetIncludeArchList(self, IncludeArchList):
128        self.IncludeArchList = IncludeArchList
129
130    def GetIncludeArchList(self):
131        return self.IncludeArchList
132
133    def SetStandardIncludeFileList(self, StandardIncludeFileList):
134        self.StandardIncludeFileList = StandardIncludeFileList
135
136    def GetStandardIncludeFileList(self):
137        return self.StandardIncludeFileList
138
139    def SetPackageIncludeFileList(self, PackageIncludeFileList):
140        self.PackageIncludeFileList = PackageIncludeFileList
141
142    def GetPackageIncludeFileList(self):
143        return self.PackageIncludeFileList
144
145    def SetProtocolList(self, ProtocolList):
146        self.ProtocolList = ProtocolList
147
148    def GetProtocolList(self):
149        return self.ProtocolList
150
151    def SetPpiList(self, PpiList):
152        self.PpiList = PpiList
153
154    def GetPpiList(self):
155        return self.PpiList
156
157    def SetGuidList(self, GuidList):
158        self.GuidList = GuidList
159
160    def GetGuidList(self):
161        return self.GuidList
162
163    def SetPcdList(self, PcdList):
164        self.PcdList = PcdList
165
166    def GetPcdList(self):
167        return self.PcdList
168
169    def SetUserExtensionList(self, UserExtensionList):
170        self.UserExtensionList = UserExtensionList
171
172    def GetUserExtensionList(self):
173        return self.UserExtensionList
174
175    def SetMiscFileList(self, MiscFileList):
176        self.MiscFileList = MiscFileList
177
178    def GetMiscFileList(self):
179        return self.MiscFileList
180
181    def SetModuleDict(self, ModuleDict):
182        self.ModuleDict = ModuleDict
183
184    def GetModuleDict(self):
185        return self.ModuleDict
186
187    def SetClonedFromList(self, ClonedFromList):
188        self.ClonedFromList = ClonedFromList
189
190    def GetClonedFromList(self):
191        return self.ClonedFromList
192
193    def SetModuleFileList(self, ModuleFileList):
194        self.ModuleFileList = ModuleFileList
195
196    def GetModuleFileList(self):
197        return self.ModuleFileList
198
199