## @file
# This file is used to define class objects of INF file [LibraryClasses] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the BSD License which accompanies this
# distribution. The full text of the license may be found at
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
'''
InfLibraryClassesObject
'''
## GetArchModuleType
#
# Get Arch List and ModuleType List
#
__SupArchList = []
__SupModuleList = []
#
# Validate Arch
#
ArchItem = 'COMMON'
ModuleItem = 'COMMON'
if ArchItem not in __SupArchList:
if Entry not in __SupModuleList:
return (__SupArchList, __SupModuleList)
class InfLibraryClassItem():
self.SupArchList = []
self.SupModuleList = []
return self.HelpString
return self.FeatureFlagExp
return self.SupArchList
return self.SupModuleList
#
# As Build related information
#
## INF LibraryClass Section
#
#
#
class InfLibraryClassObject():
#
# Macro defined in this section should be only used in this section.
#
##SetLibraryClasses
#
#
# @param HelpString: It can be a common comment or contain a recommend
# instance.
#
#
# Validate Arch
#
for LibItem in LibContent:
if not GlobalData.gIS_BINARY_INF:
if HelpStringObj != None:
else:
else:
else:
#
# Validate FFE
#
if not FeatureFlagRtv[0]:
#
# Invalid strings
#
#
# Determine Library class duplicate. Follow below rule:
#
# A library class keyword must not be duplicated within a
# [LibraryClasses] section. Library class keywords may appear in
# multiple architectural and module type [LibraryClasses] sections.
# A library class keyword listed in an architectural or module type
# [LibraryClasses] section must not be listed in the common
# architectural or module type [LibraryClasses] section.
#
# NOTE: This check will not report error now. But keep code for future enhancement.
#
# for Item in self.LibraryClasses:
# if Item.GetLibName() == LibItemObj.GetLibName():
# ItemSupArchList = Item.GetSupArchList()
# ItemSupModuleList = Item.GetSupModuleList()
# for ItemArch in ItemSupArchList:
# for ItemModule in ItemSupModuleList:
# for LibItemObjArch in __SupArchList:
# for LibItemObjModule in __SupModuleList:
# if ItemArch == LibItemObjArch and LibItemObjModule == ItemModule:
# #
# # ERR_INF_PARSER_ITEM_DUPLICATE
# #
# pass
# if (ItemArch.upper() == 'COMMON' or LibItemObjArch.upper() == 'COMMON') \
# and LibItemObjModule == ItemModule:
# #
# # ERR_INF_PARSER_ITEM_DUPLICATE_COMMON
# #
# pass
else:
#
# Assume the file GUID is well formatted.
#
else:
LibraryList = []
return True
return self.LibraryClasses