]>
Commit | Line | Data |
---|---|---|
4234283c LG |
1 | ## @file\r |
2 | # This file is used to define class objects of INF file header. \r | |
3 | # It will consumed by InfParser. \r | |
4 | #\r | |
5 | # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r | |
6 | #\r | |
7 | # This program and the accompanying materials are licensed and made available \r | |
8 | # under the terms and conditions of the BSD License which accompanies this \r | |
9 | # distribution. The full text of the license may be found at \r | |
10 | # http://opensource.org/licenses/bsd-license.php\r | |
11 | #\r | |
12 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | '''\r | |
16 | InfHeaderObject\r | |
17 | '''\r | |
18 | \r | |
19 | ## INF file header object\r | |
20 | # \r | |
21 | # A sample file header\r | |
22 | #\r | |
23 | # ## @file xxx.inf FileName\r | |
24 | # # Abstract\r | |
25 | # # \r | |
26 | # # Description\r | |
27 | # #\r | |
28 | # # Copyright\r | |
29 | # # \r | |
30 | # # License\r | |
31 | # #\r | |
32 | #\r | |
33 | class InfHeaderObject():\r | |
34 | def __init__(self):\r | |
35 | self.FileName = ''\r | |
36 | self.Abstract = ''\r | |
37 | self.Description = ''\r | |
38 | self.Copyright = ''\r | |
39 | self.License = ''\r | |
40 | \r | |
41 | ## SetFileName\r | |
42 | #\r | |
43 | # @param FileName: File Name\r | |
44 | # \r | |
45 | def SetFileName(self, FileName):\r | |
4231a819 | 46 | if not (FileName == '' or FileName is None):\r |
4234283c LG |
47 | self.FileName = FileName\r |
48 | return True\r | |
49 | else:\r | |
50 | return False\r | |
51 | \r | |
52 | ## GetFileName\r | |
53 | # \r | |
54 | def GetFileName(self):\r | |
55 | return self.FileName\r | |
56 | \r | |
57 | ## SetAbstract\r | |
58 | # \r | |
59 | # @param Abstract: Abstract\r | |
60 | # \r | |
61 | def SetAbstract(self, Abstract):\r | |
4231a819 | 62 | if not (Abstract == '' or Abstract is None):\r |
4234283c LG |
63 | self.Abstract = Abstract\r |
64 | return True\r | |
65 | else:\r | |
66 | return False\r | |
67 | \r | |
68 | ## GetAbstract\r | |
69 | # \r | |
70 | def GetAbstract(self):\r | |
71 | return self.Abstract \r | |
72 | \r | |
73 | ## SetDescription\r | |
74 | # \r | |
75 | # @param Description: Description content \r | |
76 | # \r | |
77 | def SetDescription(self, Description):\r | |
4231a819 | 78 | if not (Description == '' or Description is None):\r |
4234283c LG |
79 | self.Description = Description\r |
80 | return True\r | |
81 | else:\r | |
82 | return False\r | |
83 | \r | |
84 | ## GetAbstract\r | |
85 | # \r | |
86 | def GetDescription(self):\r | |
87 | return self.Description \r | |
88 | \r | |
89 | ## SetCopyright\r | |
90 | # \r | |
91 | # @param Copyright: Copyright content \r | |
92 | # \r | |
93 | def SetCopyright(self, Copyright):\r | |
4231a819 | 94 | if not (Copyright == '' or Copyright is None):\r |
4234283c LG |
95 | self.Copyright = Copyright\r |
96 | return True\r | |
97 | else:\r | |
98 | return False\r | |
99 | \r | |
100 | ## GetCopyright\r | |
101 | # \r | |
102 | def GetCopyright(self):\r | |
103 | return self.Copyright \r | |
104 | \r | |
105 | ## SetCopyright\r | |
106 | # \r | |
107 | # @param License: License content \r | |
108 | # \r | |
109 | def SetLicense(self, License):\r | |
4231a819 | 110 | if not (License == '' or License is None):\r |
4234283c LG |
111 | self.License = License\r |
112 | return True\r | |
113 | else:\r | |
114 | return False\r | |
115 | \r | |
116 | ## GetLicense\r | |
117 | # \r | |
118 | def GetLicense(self):\r | |
119 | return self.License |