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, 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 ''' 16 InfHeaderObject 17 ''' 18 19 ## INF file header object 20 # 21 # A sample file header 22 # 23 # ## @file xxx.inf FileName 24 # # Abstract 25 # # 26 # # Description 27 # # 28 # # Copyright 29 # # 30 # # License 31 # # 32 # 33 class InfHeaderObject(): 34 def __init__(self): 35 self.FileName = '' 36 self.Abstract = '' 37 self.Description = '' 38 self.Copyright = '' 39 self.License = '' 40 41 ## SetFileName 42 # 43 # @param FileName: File Name 44 # 45 def SetFileName(self, FileName): 46 if not (FileName == '' or FileName == None): 47 self.FileName = FileName 48 return True 49 else: 50 return False 51 52 ## GetFileName 53 # 54 def GetFileName(self): 55 return self.FileName 56 57 ## SetAbstract 58 # 59 # @param Abstract: Abstract 60 # 61 def SetAbstract(self, Abstract): 62 if not (Abstract == '' or Abstract == None): 63 self.Abstract = Abstract 64 return True 65 else: 66 return False 67 68 ## GetAbstract 69 # 70 def GetAbstract(self): 71 return self.Abstract 72 73 ## SetDescription 74 # 75 # @param Description: Description content 76 # 77 def SetDescription(self, Description): 78 if not (Description == '' or Description == None): 79 self.Description = Description 80 return True 81 else: 82 return False 83 84 ## GetAbstract 85 # 86 def GetDescription(self): 87 return self.Description 88 89 ## SetCopyright 90 # 91 # @param Copyright: Copyright content 92 # 93 def SetCopyright(self, Copyright): 94 if not (Copyright == '' or Copyright == None): 95 self.Copyright = Copyright 96 return True 97 else: 98 return False 99 100 ## GetCopyright 101 # 102 def GetCopyright(self): 103 return self.Copyright 104 105 ## SetCopyright 106 # 107 # @param License: License content 108 # 109 def SetLicense(self, License): 110 if not (License == '' or License == None): 111 self.License = License 112 return True 113 else: 114 return False 115 116 ## GetLicense 117 # 118 def GetLicense(self): 119 return self.License