]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/PcdTools/org/tianocore/pcd/entity/DynamicTokenValue.java
Abstract the logic of Platform pcd preprocess according to FPD file to a class. And...
[mirror_edk2.git] / Tools / Source / PcdTools / org / tianocore / pcd / entity / DynamicTokenValue.java
index e8fb8e837dea3f16a0b517a8817c351dc3816cdc..175fb1a7f5cdab24537d53effdbd13452548e963 100644 (file)
@@ -2,17 +2,17 @@
   DynamicTokenValue class.\r
 \r
   This module contains the value type of a dynamic token.\r
\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
+\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.pcd.entity;\r
 \r
 import java.util.List;\r
@@ -61,40 +61,43 @@ public class DynamicTokenValue {
 \r
     ///\r
     /// The default value for HII case.\r
-    /// \r
+    ///\r
     public String      hiiDefaultValue;\r
 \r
     ///\r
+    /// ---------------------------------------------------------------------\r
     /// Following member is for VPD case.\r
-    /// BUGBUG: Consider 64 bit integer by using java.math.BigInteger.\r
-    /// \r
+    /// ---------------------------------------------------------------------\r
+    ///\r
     public String      vpdOffset;\r
 \r
-    ///\r
+    /// ---------------------------------------------------------------------\r
     /// Following member is for default case.\r
-    /// \r
+    /// ---------------------------------------------------------------------\r
     public String      value;\r
 \r
+    /**\r
+       Constructor function for DynamicTokenValue class.\r
+         \r
+    **/\r
     public DynamicTokenValue() {\r
-        this.type               = VALUE_TYPE.DEFAULT_TYPE;\r
-        this.variableName       = null;\r
-        this.variableGuid       = null;\r
-        this.variableOffset     = null;\r
-        this.hiiDefaultValue    = null;\r
-\r
-        this.vpdOffset          = null;\r
-\r
-        this.value              = null;\r
+        type               = VALUE_TYPE.DEFAULT_TYPE;\r
+        variableName       = null;\r
+        variableGuid       = null;\r
+        variableOffset     = null;\r
+        hiiDefaultValue    = null;\r
+        vpdOffset          = null;\r
+        value              = null;\r
     }\r
 \r
     /**\r
        Set the HII case data.\r
-       \r
-       @param variableName\r
-       @param variableGuid\r
-       @param variableOffset\r
-       @param hiiDefaultValue\r
-     */\r
+\r
+       @param variableName      The variable name \r
+       @param variableGuid      The variable guid\r
+       @param variableOffset    The offset of value in this variable\r
+       @param hiiDefaultValue   Default value for this PCD\r
+    **/\r
     public void setHiiData(List        variableName,\r
                            UUID        variableGuid,\r
                            String      variableOffset,\r
@@ -109,17 +112,16 @@ public class DynamicTokenValue {
 \r
     /**\r
        Get the string like L"xxx" for a variable Name.\r
-       \r
+\r
        BUGBUG: In fact, it is not correctly, variable name should be\r
                treated as unicode UINT16 array.\r
-       \r
+\r
        @return String\r
      */\r
-    public String getStringOfVariableName() \r
+    public String getStringOfVariableName()\r
         throws EntityException {\r
         String str;\r
         int    index, num;\r
-        char   ch;\r
 \r
         str = "";\r
         for (index = 0; index < variableName.size(); index ++) {\r
@@ -135,7 +137,7 @@ public class DynamicTokenValue {
 \r
     /**\r
        Set Vpd case data.\r
-       \r
+\r
        @param vpdOffset\r
      */\r
     public void setVpdData(String vpdOffset) {\r
@@ -146,7 +148,7 @@ public class DynamicTokenValue {
 \r
     /**\r
        Set default case data.\r
-       \r
+\r
        @param value\r
      */\r
     public void setValue(String value) {\r