- Timestamp:
- Oct 26, 2010 1:43:40 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/xml.cpp
r33464 r33469 468 468 } 469 469 470 /** 471 * Private implementation. 472 * @param elmRoot 473 */ 470 474 void Node::buildChildren(const ElementNode &elmRoot) // private 471 475 { … … 646 650 } 647 651 652 /** 653 * Private element constructor. 654 * @param pelmRoot 655 * @param pParent 656 * @param plibNode 657 */ 648 658 ElementNode::ElementNode(const ElementNode *pelmRoot, 649 659 Node *pParent, … … 999 1009 1000 1010 /** 1001 * Sets the given attribute .1011 * Sets the given attribute; overloaded version for const char *. 1002 1012 * 1003 1013 * If an attribute with the given name exists, it is overwritten, … … 1043 1053 } 1044 1054 1055 /** 1056 * Sets the given attribute; overloaded version for int32_t. 1057 * 1058 * If an attribute with the given name exists, it is overwritten, 1059 * otherwise a new attribute is created. Returns the attribute node 1060 * that was either created or changed. 1061 * 1062 * @param pcszName 1063 * @param i 1064 * @return 1065 */ 1045 1066 AttributeNode* ElementNode::setAttribute(const char *pcszName, int32_t i) 1046 1067 { 1047 char szValue[ 64];1068 char szValue[10]; 1048 1069 RTStrPrintf(szValue, sizeof(szValue), "%RI32", i); 1049 1070 AttributeNode *p = setAttribute(pcszName, szValue); … … 1051 1072 } 1052 1073 1074 /** 1075 * Sets the given attribute; overloaded version for uint32_t. 1076 * 1077 * If an attribute with the given name exists, it is overwritten, 1078 * otherwise a new attribute is created. Returns the attribute node 1079 * that was either created or changed. 1080 * 1081 * @param pcszName 1082 * @param u 1083 * @return 1084 */ 1053 1085 AttributeNode* ElementNode::setAttribute(const char *pcszName, uint32_t u) 1054 1086 { 1055 char szValue[ 64];1087 char szValue[10]; 1056 1088 RTStrPrintf(szValue, sizeof(szValue), "%RU32", u); 1057 1089 AttributeNode *p = setAttribute(pcszName, szValue); … … 1059 1091 } 1060 1092 1093 /** 1094 * Sets the given attribute; overloaded version for int64_t. 1095 * 1096 * If an attribute with the given name exists, it is overwritten, 1097 * otherwise a new attribute is created. Returns the attribute node 1098 * that was either created or changed. 1099 * 1100 * @param pcszName 1101 * @param i 1102 * @return 1103 */ 1061 1104 AttributeNode* ElementNode::setAttribute(const char *pcszName, int64_t i) 1062 1105 { 1063 char szValue[ 64];1106 char szValue[20]; 1064 1107 RTStrPrintf(szValue, sizeof(szValue), "%RI64", i); 1065 1108 AttributeNode *p = setAttribute(pcszName, szValue); … … 1067 1110 } 1068 1111 1112 /** 1113 * Sets the given attribute; overloaded version for uint64_t. 1114 * 1115 * If an attribute with the given name exists, it is overwritten, 1116 * otherwise a new attribute is created. Returns the attribute node 1117 * that was either created or changed. 1118 * 1119 * @param pcszName 1120 * @param u 1121 * @return 1122 */ 1069 1123 AttributeNode* ElementNode::setAttribute(const char *pcszName, uint64_t u) 1070 1124 { 1071 char szValue[ 64];1125 char szValue[20]; 1072 1126 RTStrPrintf(szValue, sizeof(szValue), "%RU64", u); 1073 1127 AttributeNode *p = setAttribute(pcszName, szValue); … … 1075 1129 } 1076 1130 1131 /** 1132 * Sets the given attribute to the given uint32_t, outputs a hexadecimal string. 1133 * 1134 * If an attribute with the given name exists, it is overwritten, 1135 * otherwise a new attribute is created. Returns the attribute node 1136 * that was either created or changed. 1137 * 1138 * @param pcszName 1139 * @param u 1140 * @return 1141 */ 1077 1142 AttributeNode* ElementNode::setAttributeHex(const char *pcszName, uint32_t u) 1078 1143 { 1079 char szValue[ 64];1144 char szValue[10]; 1080 1145 RTStrPrintf(szValue, sizeof(szValue), "0x%RX32", u); 1081 1146 AttributeNode *p = setAttribute(pcszName, szValue); … … 1083 1148 } 1084 1149 1150 /** 1151 * Sets the given attribute; overloaded version for bool. 1152 * 1153 * If an attribute with the given name exists, it is overwritten, 1154 * otherwise a new attribute is created. Returns the attribute node 1155 * that was either created or changed. 1156 * 1157 * @param pcszName 1158 * @param i 1159 * @return 1160 */ 1085 1161 AttributeNode* ElementNode::setAttribute(const char *pcszName, bool f) 1086 1162 { … … 1089 1165 1090 1166 /** 1091 * Private construct ur for a new attribute node. This one is special:1167 * Private constructor for a new attribute node. This one is special: 1092 1168 * in ppcszKey, it returns a pointer to a string buffer that should be 1093 1169 * used to index the attribute correctly with namespaces.
Note:
See TracChangeset
for help on using the changeset viewer.