--- /dev/null
+/** @file\r
+\r
+ The file is used to define Pcd Item Identification\r
+\r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ **/\r
+\r
+package org.tianocore.frameworkwizard.module.Identifications.PcdCoded;\r
+\r
+import java.util.Vector;\r
+\r
+public class PcdIdentification {\r
+ //\r
+ // Define class members\r
+ //\r
+ private String name = null;\r
+\r
+ private String guidCName = null;\r
+\r
+ private String help = null;\r
+ \r
+ private Vector<String> type = null;\r
+ \r
+ public PcdIdentification(String arg0, String arg1, String arg2, Vector<String> arg3) {\r
+ this.name = (arg0 == null ? "" : arg0);\r
+ this.guidCName = (arg1 == null ? "" : arg1);\r
+ this.help = (arg2 == null ? "" : arg2);\r
+ this.type = arg3;\r
+ }\r
+\r
+ public String getHelp() {\r
+ return help;\r
+ }\r
+\r
+ public void setHelp(String help) {\r
+ this.help = help;\r
+ }\r
+\r
+ public String getGuidCName() {\r
+ return guidCName;\r
+ }\r
+\r
+ public void setGuidCName(String guidCName) {\r
+ this.guidCName = guidCName;\r
+ }\r
+\r
+ public String getName() {\r
+ return name;\r
+ }\r
+\r
+ public void setName(String name) {\r
+ this.name = name;\r
+ }\r
+\r
+ public Vector<String> getType() {\r
+ return type;\r
+ }\r
+\r
+ public void setType(Vector<String> type) {\r
+ this.type = type;\r
+ }\r
+ \r
+ public String toString() {\r
+ return name;\r
+ }\r
+}\r
--- /dev/null
+/** @file\r
+ \r
+ The file is used to define Pcd Vector\r
+ \r
+ Copyright (c) 2006, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+ \r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ \r
+ **/\r
+package org.tianocore.frameworkwizard.module.Identifications.PcdCoded;\r
+\r
+import java.util.Vector;\r
+\r
+public class PcdVector {\r
+ \r
+ private Vector<PcdIdentification> vPcd = new Vector<PcdIdentification>();\r
+ \r
+ public int findPcd(PcdIdentification sfi) {\r
+ for (int index = 0; index < vPcd.size(); index++) {\r
+ if (vPcd.elementAt(index).equals(sfi)) {\r
+ return index;\r
+ }\r
+ }\r
+ return -1;\r
+ }\r
+\r
+ public int findPcd(String name) {\r
+ for (int index = 0; index < vPcd.size(); index++) {\r
+ if (vPcd.elementAt(index).getName().equals(name)) {\r
+ return index;\r
+ }\r
+ }\r
+ return -1;\r
+ }\r
+\r
+ public PcdIdentification getPcd(int index) {\r
+ if (index > -1) {\r
+ return vPcd.elementAt(index);\r
+ } else {\r
+ return null;\r
+ }\r
+ }\r
+\r
+ public void addPcd(PcdIdentification arg0) {\r
+ vPcd.addElement(arg0);\r
+ }\r
+\r
+ public void setPcd(PcdIdentification arg0, int arg1) {\r
+ vPcd.setElementAt(arg0, arg1);\r
+ }\r
+\r
+ public void removePcd(PcdIdentification arg0) {\r
+ int index = findPcd(arg0);\r
+ if (index > -1) {\r
+ vPcd.removeElementAt(index);\r
+ }\r
+ }\r
+\r
+ public void removePcd(int index) {\r
+ if (index > -1 && index < this.size()) {\r
+ vPcd.removeElementAt(index);\r
+ }\r
+ }\r
+\r
+ public Vector<PcdIdentification> getvPcd() {\r
+ return vPcd;\r
+ }\r
+\r
+ public void setvPcd(Vector<PcdIdentification> Pcd) {\r
+ vPcd = Pcd;\r
+ }\r
+\r
+ public Vector<String> getPcdName() {\r
+ Vector<String> v = new Vector<String>();\r
+ for (int index = 0; index < this.vPcd.size(); index++) {\r
+ v.addElement(vPcd.get(index).getName());\r
+ }\r
+ return v;\r
+ }\r
+\r
+ public int size() {\r
+ return this.vPcd.size();\r
+ }\r
+ \r
+ public void addAll(PcdVector v) {\r
+ if (v != null) {\r
+ for (int index = 0; index < v.size(); index++) {\r
+ vPcd.add(v.getPcd(index));\r
+ }\r
+ }\r
+ }\r
+}\r