]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/PcdTools/org/tianocore/pcd/entity/DynamicTokenValue.java
Modify code according to Wang, jian's comments.
[mirror_edk2.git] / Tools / Source / PcdTools / org / tianocore / pcd / entity / DynamicTokenValue.java
index 175fb1a7f5cdab24537d53effdbd13452548e963..2de993d5111d9242ff12b2f85163b813cea77546 100644 (file)
@@ -20,26 +20,33 @@ import java.util.UUID;
 \r
 import org.tianocore.pcd.exception.EntityException;\r
 \r
-/** This class is to descript a value type of dynamic PCD.\r
-    For a dynamic or dynamicEx type PCD data, the value type can be:\r
-        1) Hii type: the value of dynamic or dynamicEx is stored into a variable.\r
-        2) Vpd type: the value of dynamic or dynamicEx is stored into somewhere set\r
-                     by OEM.\r
-        3) Default type: the value of dynamic or dynamicEx is stored into PCD dynamic\r
-                         database.\r
+/** \r
+   This class is to descript a value type of dynamic PCD.\r
+   For a dynamic or dynamicEx type PCD data, the value type can be:\r
+       1) Hii type: the value of dynamic or dynamicEx is stored into a variable.\r
+       2) Vpd type: the value of dynamic or dynamicEx is stored into somewhere set\r
+                    by OEM.\r
+       3) Default type: the value of dynamic or dynamicEx is stored into PCD dynamic\r
+                        database.\r
 **/\r
 public class DynamicTokenValue {\r
     ///\r
     /// Enumeration macro defintion for value type.\r
-    /// BUGBUG: Not use upcase charater is to facility for reading. It may be changed\r
-    ///         in coding review.\r
+    ///\r
     public enum        VALUE_TYPE {HII_TYPE, VPD_TYPE, DEFAULT_TYPE}\r
 \r
+    ///\r
+    /// The value type maybe:\r
+    /// HII_TYPE: the value stored into variable area.\r
+    /// VPD_TYPE: the value stored into OEM specific area.\r
+    /// DEFAULT_TYPE: the value stored into PCD runtime database.\r
+    /// \r
     public VALUE_TYPE  type;\r
 \r
     ///\r
     /// ---------------------------------------------------------------------\r
-    /// Following member is for HII case.\r
+    /// Following member is for HII case. The value of HII case will be put \r
+    /// into variable area in flash.\r
     /// ---------------------------------------------------------------------\r
     ///\r
 \r
@@ -66,14 +73,21 @@ public class DynamicTokenValue {
 \r
     ///\r
     /// ---------------------------------------------------------------------\r
-    /// Following member is for VPD case.\r
+    /// Following member is for VPD case. The value of VPD case will be put into\r
+    /// some flash position pointed by OEM.\r
     /// ---------------------------------------------------------------------\r
     ///\r
+\r
     public String      vpdOffset;\r
 \r
     /// ---------------------------------------------------------------------\r
-    /// Following member is for default case.\r
+    /// Following member is for default case. The value of default type will\r
+    /// be put into PCD runtime database.\r
     /// ---------------------------------------------------------------------\r
+\r
+    ///\r
+    /// The default value of this PCD in default case.\r
+    /// \r
     public String      value;\r
 \r
     /**\r
@@ -116,15 +130,17 @@ public class DynamicTokenValue {
        BUGBUG: In fact, it is not correctly, variable name should be\r
                treated as unicode UINT16 array.\r
 \r
-       @return String\r
-     */\r
+       @return String \r
+    **/\r
     public String getStringOfVariableName()\r
         throws EntityException {\r
         String str;\r
         int    index, num;\r
+        int    size;\r
 \r
-        str = "";\r
-        for (index = 0; index < variableName.size(); index ++) {\r
+        str  = "";\r
+        size = variableName.size();\r
+        for (index = 0; index < size; index++) {\r
             num = Integer.decode(variableName.get(index).toString());\r
             if ((num > 127 ) || (num < 0)) {\r
                 throw new EntityException(String.format("variable name contains >0x80 character, now is not support!"));\r
@@ -138,8 +154,8 @@ public class DynamicTokenValue {
     /**\r
        Set Vpd case data.\r
 \r
-       @param vpdOffset\r
-     */\r
+       @param vpdOffset the value offset the start address of OEM specific.\r
+    **/\r
     public void setVpdData(String vpdOffset) {\r
         this.type = VALUE_TYPE.VPD_TYPE;\r
 \r
@@ -150,7 +166,7 @@ public class DynamicTokenValue {
        Set default case data.\r
 \r
        @param value\r
-     */\r
+    **/\r
     public void setValue(String value) {\r
         this.type = VALUE_TYPE.DEFAULT_TYPE;\r
 \r