2 # This file is used to define common items of class object
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
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 # This class defined SkuInfo item used in Module/Platform/Package files
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 ''
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
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
46 if DefaultStore
is None:
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
59 self
.VpdOffset
= VpdOffset
64 self
.DefaultValue
= DefaultValue
66 ## Convert the class to a string
68 # Convert each member of the class to string
69 # Organize to a signle line format string
71 # @retval Rtn Formatted String
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
) + ","