\r
**/\r
public class CommonDefinition {\r
- public final static String spdSuffix = ".spd";\r
- public final static String mbdSuffix = ".mbd";\r
- public final static String msaSuffix = ".msa";\r
+\r
public final static String LibraryStr = "LIBRARY";\r
public final static String autoGenHbegin = "extern int __make_me_compile_correctly;\r\n";\r
public final static String include = "#include";\r
public final static String tianoR8FlashMapH = "TianoR8FlashMap.h";\r
public final static String flashMapH = "FlashMap.h";\r
\r
- public final static String pcdLibName = "PcdLib";\r
-\r
- //\r
- // The defintions for identifying current module\r
- // is PEI Pcd driver or Dxe Pcd driver.\r
- // \r
+ ///\r
+ /// The defintions for identifying current module\r
+ /// is PEI Pcd driver or Dxe Pcd driver.\r
+ /// \r
public static enum PCD_DRIVER_TYPE { NOT_PCD_DRIVER,\r
PEI_PCD_DRIVER, \r
DXE_PCD_DRIVER,\r
UNKNOWN_PCD_DRIVER};\r
\r
- //\r
- // AutoGen.h and AutoGen.c file's header\r
- //\r
+ ///\r
+ /// AutoGen.h and AutoGen.c file's header\r
+ ///\r
public final static String autogenHNotation = \r
"/**\r\n" +\r
" DO NOT EDIT\r\n" +\r
" Auto-generated AutoGen.c for building module or library.\r\n" +\r
"**/\r\n\r\n";\r
\r
- //\r
- // module type\r
- //\r
+ ///\r
+ /// module type\r
+ ///\r
public final static int ModuleTypeBase = 0;\r
public final static int ModuleTypeSec = 1;\r
public final static int ModuleTypePeiCore = 2;\r
public final static int ModuleTypeUefiApplication = 10;\r
public final static int ModuleTypeUnknown = 11;\r
\r
-\r
- //\r
- // component type\r
- // \r
- public final static int ComponentTypeNull = 0;\r
- public final static int ComponentTypeApriori = 1;\r
- public final static int ComponentTypeSec = 2;\r
- public final static int ComponentTypeLibrary = 3;\r
- public final static int ComponentTypeFvImageFile = 4;\r
- public final static int ComponentTypeBsDriver = 5;\r
- public final static int ComponentTypeRtDriver = 6;\r
- public final static int ComponentTypeSalRtDriver =7;\r
- public final static int ComponentTypePe32Peim = 8;\r
- public final static int ComponentTypePicPeim =9;\r
- public final static int ComponentTypeCombinedPeimDriver =10;\r
- public final static int ComponentTypePeiCore = 11;\r
- public final static int ComponentTypeDxeCore = 12;\r
- public final static int ComponentTypeApplication = 13;\r
- public final static int ComponentTypeBsDriverEfi = 14;\r
- public final static int ComponentTypeShellApp = 15;\r
- public final static int ComponentTypeBinary =16;\r
- public final static int ComponentTypeLogo = 17;\r
- public final static int ComponentTypeCustomBuild = 18;\r
- public final static int ComponentTypeUnknown = 19;\r
-\r
-\r
- //\r
- // Usaged style\r
- //\r
+ ///\r
+ /// Usaged style\r
+ ///\r
public final static String AlwaysConsumed = "ALWAYS_CONSUMED";\r
public final static String AlwaysProduced = "ALWAYS_PRODUCED";\r
\r
}\r
}\r
\r
- //\r
- // Module type\r
- //\r
+ ///\r
+ /// Module type\r
+ ///\r
public static final MyEnum[] moduleEnum = new MyEnum[] {\r
new MyEnum("BASE", ModuleTypeBase),\r
new MyEnum("SEC", ModuleTypeSec),\r
new MyEnum("UEFI_DRIVER", ModuleTypeUefiDriver),\r
new MyEnum("UEFI_APPLICATION", ModuleTypeUefiApplication)};\r
\r
- //\r
- // Component type\r
- //\r
- public static final MyEnum[] componentEnum = new MyEnum[]{\r
- new MyEnum("APRIORI", ComponentTypeApriori),\r
- new MyEnum("SEC", ComponentTypeSec),\r
- new MyEnum("LIBRARY", ComponentTypeLibrary),\r
- new MyEnum("FV_IMAGE_FILE", ComponentTypeFvImageFile),\r
- new MyEnum("BS_DRIVER", ComponentTypeBsDriver),\r
- new MyEnum("RT_DRIVER", ComponentTypeRtDriver),\r
- new MyEnum("SAL_RT_DRIVER", ComponentTypeSalRtDriver),\r
- new MyEnum("PE32_PEIM", ComponentTypePe32Peim),\r
- new MyEnum("PIC_PEIM", ComponentTypePicPeim),\r
- new MyEnum("COMBINED_PEIM_DRIVER", ComponentTypeCombinedPeimDriver),\r
- new MyEnum("PEI_CORE", ComponentTypePeiCore),\r
- new MyEnum("DXE_CORE", ComponentTypeDxeCore),\r
- new MyEnum("APPLICATION", ComponentTypeApplication),\r
- new MyEnum("BS_DRIVER_EFI", ComponentTypeBsDriverEfi),\r
- new MyEnum("SHELLAPP", ComponentTypeShellApp),\r
- new MyEnum("BINARY", ComponentTypeBinary),\r
- new MyEnum("LOGO", ComponentTypeLogo),\r
- new MyEnum("CUSTOM_BUILD", ComponentTypeCustomBuild)\r
- };\r
-\r
/**\r
getModuleType\r
\r
}\r
\r
/**\r
- getComponentType\r
+ formateGuidName\r
\r
- This function get the component type value according commponet type \r
- string.\r
+ This function is to formate GUID to ANSI c form.\r
\r
- @param componentTypeStr String of component type.\r
- @return\r
- **/\r
- static public int getComponentType (String componentTypeStr){\r
- int returnValue = -1;\r
- for (int i = 0; i < CommonDefinition.componentEnum.length; i++) {\r
- returnValue = CommonDefinition.componentEnum[i].ForInt(componentTypeStr);\r
- if (returnValue != -1) {\r
- return returnValue;\r
- }\r
- }\r
- return CommonDefinition.ComponentTypeUnknown;\r
- }\r
-\r
- /**\r
- getComponentTypeString\r
- \r
- This function get the commponet type string according component type value.\r
- \r
- @param componentType Integer value of component type.\r
- @return\r
+ @param guidNameCon\r
+ String of GUID.\r
+ @return Formated GUID.\r
**/\r
- static public String getComponentTypeString (int componentType) {\r
- if ((componentType > CommonDefinition.ComponentTypeUnknown) || \r
- (componentType < CommonDefinition.ComponentTypeNull)) {\r
- return null;\r
- }\r
- for (int index = 0; index < CommonDefinition.componentEnum.length; index ++) {\r
- if (componentType == CommonDefinition.componentEnum[index].type) {\r
- return CommonDefinition.componentEnum[index].moduleTypeStr;\r
- }\r
- }\r
- return null;\r
- }\r
-\r
- /**\r
- isLibraryComponent \r
- \r
- This function is to check does componet is library according to commponet\r
- type value.\r
- \r
- @param componentType Integer value of component type.\r
- @return\r
- **/\r
- static public boolean isLibraryComponent (int componentType) {\r
- if (ComponentTypeLibrary == componentType) {\r
- return true;\r
- }\r
- return false;\r
- }\r
-\r
- /**\r
- * formateGuidName\r
- * \r
- * This function is to formate GUID to ANSI c form.\r
- * \r
- * @param guidNameCon\r
- * String of GUID.\r
- * @return Formated GUID.\r
- */\r
public static String formatGuidName(String guidNameConv) {\r
String[] strList;\r
String guid = "";\r
}\r
\r
/**\r
- * Remove deuplicat string in list\r
- * \r
- * This function is to duplicat string in list\r
- * \r
- * @param String[]\r
- * String list.\r
- * @return String[] String list which remove the duplicate string.\r
- */\r
+ Remove deuplicat string in list\r
+ \r
+ This function is to duplicat string in list\r
+ \r
+ @param String[]\r
+ String list.\r
+ @return String[] String list which remove the duplicate string.\r
+ **/\r
public static String[] remDupString (String[] orgList){\r
Set<String> strList = new LinkedHashSet<String>();\r
String[] desList ;\r