]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/UPT/Object/Parser/InfHeaderObject.py
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Object / Parser / InfHeaderObject.py
1 ## @file
2 # This file is used to define class objects of INF file header.
3 # It will consumed by InfParser.
4 #
5 # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
6 #
7 # SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 '''
10 InfHeaderObject
11 '''
12
13 ## INF file header object
14 #
15 # A sample file header
16 #
17 # ## @file xxx.inf FileName
18 # # Abstract
19 # #
20 # # Description
21 # #
22 # # Copyright
23 # #
24 # # License
25 # #
26 #
27 class InfHeaderObject():
28 def __init__(self):
29 self.FileName = ''
30 self.Abstract = ''
31 self.Description = ''
32 self.Copyright = ''
33 self.License = ''
34
35 ## SetFileName
36 #
37 # @param FileName: File Name
38 #
39 def SetFileName(self, FileName):
40 if not (FileName == '' or FileName is None):
41 self.FileName = FileName
42 return True
43 else:
44 return False
45
46 ## GetFileName
47 #
48 def GetFileName(self):
49 return self.FileName
50
51 ## SetAbstract
52 #
53 # @param Abstract: Abstract
54 #
55 def SetAbstract(self, Abstract):
56 if not (Abstract == '' or Abstract is None):
57 self.Abstract = Abstract
58 return True
59 else:
60 return False
61
62 ## GetAbstract
63 #
64 def GetAbstract(self):
65 return self.Abstract
66
67 ## SetDescription
68 #
69 # @param Description: Description content
70 #
71 def SetDescription(self, Description):
72 if not (Description == '' or Description is None):
73 self.Description = Description
74 return True
75 else:
76 return False
77
78 ## GetAbstract
79 #
80 def GetDescription(self):
81 return self.Description
82
83 ## SetCopyright
84 #
85 # @param Copyright: Copyright content
86 #
87 def SetCopyright(self, Copyright):
88 if not (Copyright == '' or Copyright is None):
89 self.Copyright = Copyright
90 return True
91 else:
92 return False
93
94 ## GetCopyright
95 #
96 def GetCopyright(self):
97 return self.Copyright
98
99 ## SetCopyright
100 #
101 # @param License: License content
102 #
103 def SetLicense(self, License):
104 if not (License == '' or License is None):
105 self.License = License
106 return True
107 else:
108 return False
109
110 ## GetLicense
111 #
112 def GetLicense(self):
113 return self.License