• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## @file
2# This file is used to define common class objects of [Defines] section for INF file.
3# It will consumed by InfParser
4#
5# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
6#
7# This program and the accompanying materials are licensed and made available
8# under the terms and conditions of the BSD License which accompanies this
9# distribution. The full text of the license may be found at
10# http://opensource.org/licenses/bsd-license.php
11#
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15'''
16InfDefineCommonObject
17'''
18
19from Object.Parser.InfCommonObject import InfLineCommentObject
20
21## InfDefineImageExeParamItem
22#
23class InfDefineImageExeParamItem():
24    def __init__(self):
25        self.CName  = ''
26        self.FeatureFlagExp = ''
27        self.Comments = InfLineCommentObject()
28
29    def SetCName(self, CName):
30        self.CName = CName
31    def GetCName(self):
32        return self.CName
33    def SetFeatureFlagExp(self, FeatureFlagExp):
34        self.FeatureFlagExp = FeatureFlagExp
35    def GetFeatureFlagExp(self):
36        return self.FeatureFlagExp
37
38## InfDefineEntryPointItem
39#
40class InfDefineEntryPointItem(InfDefineImageExeParamItem):
41    def __init__(self):
42        InfDefineImageExeParamItem.__init__(self)
43
44## InfDefineUnloadImageItem
45#
46class InfDefineUnloadImageItem(InfDefineImageExeParamItem):
47    def __init__(self):
48        InfDefineImageExeParamItem.__init__(self)
49
50## InfDefineConstructorItem
51#
52class InfDefineConstructorItem(InfDefineImageExeParamItem):
53    def __init__(self):
54        InfDefineImageExeParamItem.__init__(self)
55        self.SupModList = []
56
57    def SetSupModList(self, SupModList):
58        self.SupModList = SupModList
59    def GetSupModList(self):
60        return self.SupModList
61
62## InfDefineDestructorItem
63#
64class InfDefineDestructorItem(InfDefineImageExeParamItem):
65    def __init__(self):
66        InfDefineImageExeParamItem.__init__(self)
67        self.SupModList = []
68
69    def SetSupModList(self, SupModList):
70        self.SupModList = SupModList
71    def GetSupModList(self):
72        return self.SupModList
73
74## InfDefineLibraryItem
75#
76class InfDefineLibraryItem():
77    def __init__(self):
78        self.LibraryName = ''
79        self.Types = []
80        self.Comments = InfLineCommentObject()
81
82    def SetLibraryName(self, Name):
83        self.LibraryName = Name
84    def GetLibraryName(self):
85        return self.LibraryName
86    def SetTypes(self, Type):
87        self.Types = Type
88    def GetTypes(self):
89        return self.Types