]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/CommonDataClass/CommonClass.py
BaseTools: CommonClass - remove unused classes
[mirror_edk2.git] / BaseTools / Source / Python / CommonDataClass / CommonClass.py
1 ## @file
2 # This file is used to define common items of class object
3 #
4 # Copyright (c) 2007 - 2018, 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
9 #
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.
12
13
14 ## SkuInfoClass
15 #
16 # This class defined SkuInfo item used in Module/Platform/Package files
17 #
18 # @param object: Inherited from object class
19 # @param SkuIdName: Input value for SkuIdName, default is ''
20 # @param SkuId: Input value for SkuId, default is ''
21 # @param VariableName: Input value for VariableName, default is ''
22 # @param VariableGuid: Input value for VariableGuid, default is ''
23 # @param VariableOffset: Input value for VariableOffset, default is ''
24 # @param HiiDefaultValue: Input value for HiiDefaultValue, default is ''
25 # @param VpdOffset: Input value for VpdOffset, default is ''
26 # @param DefaultValue: Input value for DefaultValue, default is ''
27 #
28 # @var SkuIdName: To store value for SkuIdName
29 # @var SkuId: To store value for SkuId
30 # @var VariableName: To store value for VariableName
31 # @var VariableGuid: To store value for VariableGuid
32 # @var VariableOffset: To store value for VariableOffset
33 # @var HiiDefaultValue: To store value for HiiDefaultValue
34 # @var VpdOffset: To store value for VpdOffset
35 # @var DefaultValue: To store value for DefaultValue
36 #
37 class SkuInfoClass(object):
38 def __init__(self, SkuIdName = '', SkuId = '', VariableName = '', VariableGuid = '', VariableOffset = '',
39 HiiDefaultValue = '', VpdOffset = '', DefaultValue = '', VariableGuidValue = '', VariableAttribute = '', DefaultStore = None):
40 self.SkuIdName = SkuIdName
41 self.SkuId = SkuId
42
43 #
44 # Used by Hii
45 #
46 if DefaultStore is None:
47 DefaultStore = {}
48 self.VariableName = VariableName
49 self.VariableGuid = VariableGuid
50 self.VariableGuidValue = VariableGuidValue
51 self.VariableOffset = VariableOffset
52 self.HiiDefaultValue = HiiDefaultValue
53 self.VariableAttribute = VariableAttribute
54 self.DefaultStoreDict = DefaultStore
55
56 #
57 # Used by Vpd
58 #
59 self.VpdOffset = VpdOffset
60
61 #
62 # Used by Default
63 #
64 self.DefaultValue = DefaultValue
65
66 ## Convert the class to a string
67 #
68 # Convert each member of the class to string
69 # Organize to a signle line format string
70 #
71 # @retval Rtn Formatted String
72 #
73 def __str__(self):
74 Rtn = 'SkuId = ' + str(self.SkuId) + "," + \
75 'SkuIdName = ' + str(self.SkuIdName) + "," + \
76 'VariableName = ' + str(self.VariableName) + "," + \
77 'VariableGuid = ' + str(self.VariableGuid) + "," + \
78 'VariableOffset = ' + str(self.VariableOffset) + "," + \
79 'HiiDefaultValue = ' + str(self.HiiDefaultValue) + "," + \
80 'VpdOffset = ' + str(self.VpdOffset) + "," + \
81 'DefaultValue = ' + str(self.DefaultValue) + ","
82 return Rtn