diff options
author | hche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-14 05:45:53 +0000 |
---|---|---|
committer | hche10x <hche10x@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-14 05:45:53 +0000 |
commit | 985384609e468bb6d6b9c2507f6009b3fb6bc044 (patch) | |
tree | d4ad0b93f05e13060cb3a5396ee34300f923b0de /Tools | |
parent | 9a8d6d9fb7143f092e9cba98747814539d3cfaa0 (diff) | |
download | edk2-platforms-985384609e468bb6d6b9c2507f6009b3fb6bc044.tar.xz |
1. Add pcd item Identifications used by select pcd entry when editing pcd in msa
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@997 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
2 files changed, 171 insertions, 0 deletions
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdIdentification.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdIdentification.java new file mode 100644 index 0000000000..85a770662a --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdIdentification.java @@ -0,0 +1,74 @@ +/** @file
+
+ The file is used to define Pcd Item Identification
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. 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
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ **/
+
+package org.tianocore.frameworkwizard.module.Identifications.PcdCoded;
+
+import java.util.Vector;
+
+public class PcdIdentification {
+ //
+ // Define class members
+ //
+ private String name = null;
+
+ private String guidCName = null;
+
+ private String help = null;
+
+ private Vector<String> type = null;
+
+ public PcdIdentification(String arg0, String arg1, String arg2, Vector<String> arg3) {
+ this.name = (arg0 == null ? "" : arg0);
+ this.guidCName = (arg1 == null ? "" : arg1);
+ this.help = (arg2 == null ? "" : arg2);
+ this.type = arg3;
+ }
+
+ public String getHelp() {
+ return help;
+ }
+
+ public void setHelp(String help) {
+ this.help = help;
+ }
+
+ public String getGuidCName() {
+ return guidCName;
+ }
+
+ public void setGuidCName(String guidCName) {
+ this.guidCName = guidCName;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Vector<String> getType() {
+ return type;
+ }
+
+ public void setType(Vector<String> type) {
+ this.type = type;
+ }
+
+ public String toString() {
+ return name;
+ }
+}
diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdVector.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdVector.java new file mode 100644 index 0000000000..5834744bdc --- /dev/null +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/Identifications/PcdCoded/PcdVector.java @@ -0,0 +1,97 @@ +/** @file
+
+ The file is used to define Pcd Vector
+
+ Copyright (c) 2006, Intel Corporation
+ All rights reserved. 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
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+ **/
+package org.tianocore.frameworkwizard.module.Identifications.PcdCoded;
+
+import java.util.Vector;
+
+public class PcdVector {
+
+ private Vector<PcdIdentification> vPcd = new Vector<PcdIdentification>();
+
+ public int findPcd(PcdIdentification sfi) {
+ for (int index = 0; index < vPcd.size(); index++) {
+ if (vPcd.elementAt(index).equals(sfi)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ public int findPcd(String name) {
+ for (int index = 0; index < vPcd.size(); index++) {
+ if (vPcd.elementAt(index).getName().equals(name)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ public PcdIdentification getPcd(int index) {
+ if (index > -1) {
+ return vPcd.elementAt(index);
+ } else {
+ return null;
+ }
+ }
+
+ public void addPcd(PcdIdentification arg0) {
+ vPcd.addElement(arg0);
+ }
+
+ public void setPcd(PcdIdentification arg0, int arg1) {
+ vPcd.setElementAt(arg0, arg1);
+ }
+
+ public void removePcd(PcdIdentification arg0) {
+ int index = findPcd(arg0);
+ if (index > -1) {
+ vPcd.removeElementAt(index);
+ }
+ }
+
+ public void removePcd(int index) {
+ if (index > -1 && index < this.size()) {
+ vPcd.removeElementAt(index);
+ }
+ }
+
+ public Vector<PcdIdentification> getvPcd() {
+ return vPcd;
+ }
+
+ public void setvPcd(Vector<PcdIdentification> Pcd) {
+ vPcd = Pcd;
+ }
+
+ public Vector<String> getPcdName() {
+ Vector<String> v = new Vector<String>();
+ for (int index = 0; index < this.vPcd.size(); index++) {
+ v.addElement(vPcd.get(index).getName());
+ }
+ return v;
+ }
+
+ public int size() {
+ return this.vPcd.size();
+ }
+
+ public void addAll(PcdVector v) {
+ if (v != null) {
+ for (int index = 0; index < v.size(); index++) {
+ vPcd.add(v.getPcd(index));
+ }
+ }
+ }
+}
|