Changeset 469 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Jan 31, 2007 3:57:59 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/COMDefs.h
r382 r469 96 96 #define IUnknown nsISupports 97 97 98 #define LONG int32_t99 #define ULONG uint32_t100 #define LONG64 int64_t101 #define ULONG64 uint64_t102 #define USHORT uint16_t103 #define SHORT int16_t104 98 #define BOOL PRBool 99 #define BYTE PRUint8 100 #define SHORT PRInt16 101 #define USHORT PRUint16 102 #define LONG PRInt32 103 #define ULONG PRUint32 104 #define LONG64 PRInt64 105 #define ULONG64 PRUint64 106 105 107 #define BSTR PRUnichar* 106 108 #define LPBSTR BSTR* -
trunk/src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl
r382 r469 1032 1032 </xsl:message> 1033 1033 </xsl:if> 1034 1034 1035 <xsl:choose> 1035 <!-- standard types --> 1036 <xsl:when test=".='result'">HRESULT</xsl:when> 1037 <xsl:when test=".='boolean'">BOOL</xsl:when> 1038 <xsl:when test=".='octet'">BYTE</xsl:when> 1039 <xsl:when test=".='short'">SHORT</xsl:when> 1040 <xsl:when test=".='unsigned short'">USHORT</xsl:when> 1041 <xsl:when test=".='long'">LONG</xsl:when> 1042 <xsl:when test=".='long long'">LONG64</xsl:when> 1043 <xsl:when test=".='unsigned long'">ULONG</xsl:when> 1044 <xsl:when test=".='unsigned long long'">ULONG64</xsl:when> 1045 <xsl:when test=".='char'">CHAR</xsl:when> 1046 <xsl:when test=".='string'">CHAR *</xsl:when> 1047 <xsl:when test=".='wchar'">OLECHAR</xsl:when> 1048 <xsl:when test=".='wstring'">QString</xsl:when> 1049 <!-- UUID type --> 1050 <xsl:when test=".='uuid'">QUuid</xsl:when> 1051 <!-- system interface types --> 1052 <xsl:when test=".='$unknown'">CUnknown</xsl:when> 1053 <xsl:otherwise> 1054 <xsl:choose> 1055 <!-- enum types --> 1056 <xsl:when test=" 1057 (ancestor::module/enum[@name=current()]) or 1058 (ancestor::module/if[@target=$self_target]/enum[@name=current()]) 1059 "> 1060 <xsl:value-of select="concat('CEnums::',string(.))"/> 1061 </xsl:when> 1062 <!-- custom interface types --> 1063 <xsl:when test=" 1064 (name(current())='enumerator' and 1065 ((ancestor::module/enumerator[@name=current()]) or 1066 (ancestor::module/if[@target=$self_target]/enumerator[@name=current()])) 1067 ) or 1068 ((ancestor::module/interface[@name=current()]) or 1069 (ancestor::module/if[@target=$self_target]/interface[@name=current()]) 1070 ) or 1071 ((ancestor::module/collection[@name=current()]) or 1072 (ancestor::module/if[@target=$self_target]/collection[@name=current()]) 1073 ) 1074 "> 1075 <xsl:value-of select="concat('C',substring(.,2))"/> 1076 </xsl:when> 1077 <!-- other types --> 1036 <!-- modifiers (ignored for 'enumeration' attributes)--> 1037 <xsl:when test="name(current())='type' and ../@mod"> 1038 <xsl:if test="../@array"> 1039 <xsl:message terminate="yes"> 1040 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 1041 <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text> 1042 </xsl:message> 1043 </xsl:if> 1044 <xsl:choose> 1045 <xsl:when test="../@mod='ptr'"> 1046 <xsl:choose> 1047 <!-- standard types --> 1048 <!--xsl:when test=".='result'">??</xsl:when--> 1049 <xsl:when test=".='boolean'">BOOL *</xsl:when> 1050 <xsl:when test=".='octet'">BYTE *</xsl:when> 1051 <xsl:when test=".='short'">SHORT *</xsl:when> 1052 <xsl:when test=".='unsigned short'">USHORT *</xsl:when> 1053 <xsl:when test=".='long'">LONG *</xsl:when> 1054 <xsl:when test=".='long long'">LONG64 *</xsl:when> 1055 <xsl:when test=".='unsigned long'">ULONG *</xsl:when> 1056 <xsl:when test=".='unsigned long long'">ULONG64 *</xsl:when> 1057 <xsl:when test=".='char'">CHAR *</xsl:when> 1058 <!--<xsl:when test=".='string'">??</xsl:when--> 1059 <xsl:when test=".='wchar'">OLECHAR *</xsl:when> 1060 <!--<xsl:when test=".='wstring'">??</xsl:when--> 1061 <xsl:otherwise> 1062 <xsl:message terminate="yes"> 1063 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 1064 <xsl:text>attribute 'mod=</xsl:text> 1065 <xsl:value-of select="concat('"',../@mod,'"')"/> 1066 <xsl:text>' cannot be used with type </xsl:text> 1067 <xsl:value-of select="concat('"',current(),'"!')"/> 1068 </xsl:message> 1069 </xsl:otherwise> 1070 </xsl:choose> 1071 </xsl:when> 1078 1072 <xsl:otherwise> 1079 1073 <xsl:message terminate="yes"> 1080 <xsl:text>Unknown parameter type: </xsl:text> 1081 <xsl:value-of select="."/> 1074 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 1075 <xsl:value-of select="concat('value "',../@mod,'" ')"/> 1076 <xsl:text>of attibute 'mod' is invalid!</xsl:text> 1082 1077 </xsl:message> 1083 1078 </xsl:otherwise> 1084 1079 </xsl:choose> 1080 </xsl:when> 1081 <!-- no modifiers --> 1082 <xsl:otherwise> 1083 <xsl:choose> 1084 <!-- standard types --> 1085 <xsl:when test=".='result'">HRESULT</xsl:when> 1086 <xsl:when test=".='boolean'">BOOL</xsl:when> 1087 <xsl:when test=".='octet'">BYTE</xsl:when> 1088 <xsl:when test=".='short'">SHORT</xsl:when> 1089 <xsl:when test=".='unsigned short'">USHORT</xsl:when> 1090 <xsl:when test=".='long'">LONG</xsl:when> 1091 <xsl:when test=".='long long'">LONG64</xsl:when> 1092 <xsl:when test=".='unsigned long'">ULONG</xsl:when> 1093 <xsl:when test=".='unsigned long long'">ULONG64</xsl:when> 1094 <xsl:when test=".='char'">CHAR</xsl:when> 1095 <xsl:when test=".='string'">CHAR *</xsl:when> 1096 <xsl:when test=".='wchar'">OLECHAR</xsl:when> 1097 <xsl:when test=".='wstring'">QString</xsl:when> 1098 <!-- UUID type --> 1099 <xsl:when test=".='uuid'">QUuid</xsl:when> 1100 <!-- system interface types --> 1101 <xsl:when test=".='$unknown'">CUnknown</xsl:when> 1102 <xsl:otherwise> 1103 <xsl:choose> 1104 <!-- enum types --> 1105 <xsl:when test=" 1106 (ancestor::module/enum[@name=current()]) or 1107 (ancestor::module/if[@target=$self_target]/enum[@name=current()]) 1108 "> 1109 <xsl:value-of select="concat('CEnums::',string(.))"/> 1110 </xsl:when> 1111 <!-- custom interface types --> 1112 <xsl:when test=" 1113 (name(current())='enumerator' and 1114 ((ancestor::module/enumerator[@name=current()]) or 1115 (ancestor::module/if[@target=$self_target]/enumerator[@name=current()])) 1116 ) or 1117 ((ancestor::module/interface[@name=current()]) or 1118 (ancestor::module/if[@target=$self_target]/interface[@name=current()]) 1119 ) or 1120 ((ancestor::module/collection[@name=current()]) or 1121 (ancestor::module/if[@target=$self_target]/collection[@name=current()]) 1122 ) 1123 "> 1124 <xsl:value-of select="concat('C',substring(.,2))"/> 1125 </xsl:when> 1126 <!-- other types --> 1127 <xsl:otherwise> 1128 <xsl:message terminate="yes"> 1129 <xsl:text>Unknown parameter type: </xsl:text> 1130 <xsl:value-of select="."/> 1131 </xsl:message> 1132 </xsl:otherwise> 1133 </xsl:choose> 1134 </xsl:otherwise> 1135 </xsl:choose> 1085 1136 </xsl:otherwise> 1086 1137 </xsl:choose> … … 1089 1140 1090 1141 <!-- 1091 * generates a null initializer for all fundamentaltypes (such as bool or long)1142 * generates a null initializer for all scalar types (such as bool or long) 1092 1143 * and enum types in the form of ' = <null_initializer>', or nothing for other 1093 1144 * types. … … 1101 1152 1102 1153 <xsl:choose> 1103 <!-- standard types that need a zero initializer --> 1104 <xsl:when test=".='result'"> = S_OK</xsl:when> 1105 <xsl:when test=".='boolean'"> = FALSE</xsl:when> 1106 <xsl:when test=".='octet'"> = 0</xsl:when> 1107 <xsl:when test=".='short'"> = 0</xsl:when> 1108 <xsl:when test=".='unsigned short'"> = 0</xsl:when> 1109 <xsl:when test=".='long'"> = 0</xsl:when> 1110 <xsl:when test=".='long long'"> = 0</xsl:when> 1111 <xsl:when test=".='unsigned long'"> = 0</xsl:when> 1112 <xsl:when test=".='unsigned long long'"> = 0</xsl:when> 1113 <xsl:when test=".='char'"> = 0</xsl:when> 1114 <xsl:when test=".='string'"> = NULL</xsl:when> 1115 <xsl:when test=".='wchar'"> = 0</xsl:when> 1154 <!-- modifiers (ignored for 'enumeration' attributes)--> 1155 <xsl:when test="name(current())='type' and ../@mod"> 1156 <xsl:if test="../@array"> 1157 <xsl:message terminate="yes"> 1158 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 1159 <xsl:text>either 'array' or 'mod' attribute is allowed, but not both!</xsl:text> 1160 </xsl:message> 1161 </xsl:if> 1162 <xsl:choose> 1163 <xsl:when test="../@mod='ptr'"> 1164 <xsl:choose> 1165 <!-- standard types --> 1166 <!--xsl:when test=".='result'">??</xsl:when--> 1167 <xsl:when test=".='boolean'"> = NULL</xsl:when> 1168 <xsl:when test=".='octet'"> = NULL</xsl:when> 1169 <xsl:when test=".='short'"> = NULL</xsl:when> 1170 <xsl:when test=".='unsigned short'"> = NULL</xsl:when> 1171 <xsl:when test=".='long'"> = NULL</xsl:when> 1172 <xsl:when test=".='long long'"> = NULL</xsl:when> 1173 <xsl:when test=".='unsigned long'"> = NULL</xsl:when> 1174 <xsl:when test=".='unsigned long long'"> = NULL</xsl:when> 1175 <xsl:when test=".='char'"> = NULL</xsl:when> 1176 <!--<xsl:when test=".='string'">??</xsl:when--> 1177 <xsl:when test=".='wchar'"> = NULL</xsl:when> 1178 <!--<xsl:when test=".='wstring'">??</xsl:when--> 1179 <xsl:otherwise> 1180 <xsl:message terminate="yes"> 1181 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 1182 <xsl:text>attribute 'mod=</xsl:text> 1183 <xsl:value-of select="concat('"',../@mod,'"')"/> 1184 <xsl:text>' cannot be used with type </xsl:text> 1185 <xsl:value-of select="concat('"',current(),'"!')"/> 1186 </xsl:message> 1187 </xsl:otherwise> 1188 </xsl:choose> 1189 </xsl:when> 1190 <xsl:otherwise> 1191 <xsl:message terminate="yes"> 1192 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 1193 <xsl:value-of select="concat('value "',../@mod,'" ')"/> 1194 <xsl:text>of attibute 'mod' is invalid!</xsl:text> 1195 </xsl:message> 1196 </xsl:otherwise> 1197 </xsl:choose> 1198 </xsl:when> 1199 <!-- no modifiers --> 1116 1200 <xsl:otherwise> 1117 1201 <xsl:choose> 1118 <!-- enum types initialized with 0 --> 1119 <xsl:when test=" 1120 (ancestor::module/enum[@name=current()]) or 1121 (ancestor::module/if[@target=$self_target]/enum[@name=current()]) 1122 "> 1123 <xsl:value-of select="concat(' = (CEnums::',string(.),') 0')"/> 1124 </xsl:when> 1202 <!-- standard types that need a zero initializer --> 1203 <xsl:when test=".='result'"> = S_OK</xsl:when> 1204 <xsl:when test=".='boolean'"> = FALSE</xsl:when> 1205 <xsl:when test=".='octet'"> = 0</xsl:when> 1206 <xsl:when test=".='short'"> = 0</xsl:when> 1207 <xsl:when test=".='unsigned short'"> = 0</xsl:when> 1208 <xsl:when test=".='long'"> = 0</xsl:when> 1209 <xsl:when test=".='long long'"> = 0</xsl:when> 1210 <xsl:when test=".='unsigned long'"> = 0</xsl:when> 1211 <xsl:when test=".='unsigned long long'"> = 0</xsl:when> 1212 <xsl:when test=".='char'"> = 0</xsl:when> 1213 <xsl:when test=".='string'"> = NULL</xsl:when> 1214 <xsl:when test=".='wchar'"> = 0</xsl:when> 1215 <xsl:otherwise> 1216 <xsl:choose> 1217 <!-- enum types initialized with 0 --> 1218 <xsl:when test=" 1219 (ancestor::module/enum[@name=current()]) or 1220 (ancestor::module/if[@target=$self_target]/enum[@name=current()]) 1221 "> 1222 <xsl:value-of select="concat(' = (CEnums::',string(.),') 0')"/> 1223 </xsl:when> 1224 </xsl:choose> 1225 </xsl:otherwise> 1125 1226 </xsl:choose> 1126 1227 </xsl:otherwise>
Note:
See TracChangeset
for help on using the changeset viewer.