comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/ole/win32/Variant.d @ 9:950d84783eac

Removing direct tango deps.
author Frank Benoit <benoit@tionex.de>
date Mon, 09 Mar 2009 14:26:40 +0100
parents 6bf2837c50fe
children 2e09b0e6857a
comparison
equal deleted inserted replaced
8:2847134a5fc0 9:950d84783eac
21 import org.eclipse.swt.internal.win32.OS; 21 import org.eclipse.swt.internal.win32.OS;
22 22
23 import org.eclipse.swt.ole.win32.OleAutomation; 23 import org.eclipse.swt.ole.win32.OleAutomation;
24 import org.eclipse.swt.ole.win32.OLE; 24 import org.eclipse.swt.ole.win32.OLE;
25 25
26 import tango.util.Convert;
27 import java.lang.all; 26 import java.lang.all;
28 27
29 /** 28 /**
30 * 29 *
31 * A Variant is a generic OLE mechanism for passing data of different types via a common interface. 30 * A Variant is a generic OLE mechanism for passing data of different types via a common interface.
1015 * @return a string representation of the Variant 1014 * @return a string representation of the Variant
1016 */ 1015 */
1017 public String toString () { 1016 public String toString () {
1018 switch (type) { 1017 switch (type) {
1019 case COM.VT_BOOL : 1018 case COM.VT_BOOL :
1020 return "VT_BOOL{"~to!(String)(booleanData)~"}"; 1019 return "VT_BOOL{"~String_valueOf(booleanData)~"}";
1021 case COM.VT_I1 : 1020 case COM.VT_I1 :
1022 return "VT_I1{"~to!(String)(byteData)~"}"; 1021 return "VT_I1{"~String_valueOf(byteData)~"}";
1023 case COM.VT_I2 : 1022 case COM.VT_I2 :
1024 return "VT_I2{"~to!(String)(shortData)~"}"; 1023 return "VT_I2{"~String_valueOf(shortData)~"}";
1025 case COM.VT_UI2 : 1024 case COM.VT_UI2 :
1026 return "VT_UI2{"~ dcharToString(charData) ~"}"; 1025 return "VT_UI2{"~ dcharToString(charData) ~"}";
1027 case COM.VT_I4 : 1026 case COM.VT_I4 :
1028 return "VT_I4{"~to!(String)(intData)~"}"; 1027 return "VT_I4{"~String_valueOf(intData)~"}";
1029 case COM.VT_I8 : 1028 case COM.VT_I8 :
1030 return "VT_I8{"~to!(String)(longData)~"}"; 1029 return "VT_I8{"~String_valueOf(longData)~"}";
1031 case COM.VT_R4 : 1030 case COM.VT_R4 :
1032 return "VT_R4{"~to!(String)(floatData)~"}"; 1031 return "VT_R4{"~String_valueOf(floatData)~"}";
1033 case COM.VT_R8 : 1032 case COM.VT_R8 :
1034 return "VT_R8{"~to!(String)(doubleData)~"}"; 1033 return "VT_R8{"~String_valueOf(doubleData)~"}";
1035 case COM.VT_BSTR : 1034 case COM.VT_BSTR :
1036 return "VT_BSTR{"~stringData~"}"; 1035 return "VT_BSTR{"~stringData~"}";
1037 case COM.VT_DISPATCH : 1036 case COM.VT_DISPATCH :
1038 return Format("VT_DISPATCH{{0x{:X}}", cast(void*) (dispatchData is null ? null : dispatchData)); 1037 return Format("VT_DISPATCH{{0x{:X}}", cast(void*) (dispatchData is null ? null : dispatchData));
1039 case COM.VT_UNKNOWN : 1038 case COM.VT_UNKNOWN :
1045 default: 1044 default:
1046 } 1045 }
1047 if ((type & COM.VT_BYREF) !is 0) { 1046 if ((type & COM.VT_BYREF) !is 0) {
1048 return Format("VT_BYREF|{}{{{}}",(type & ~COM.VT_BYREF), byRefPtr ); 1047 return Format("VT_BYREF|{}{{{}}",(type & ~COM.VT_BYREF), byRefPtr );
1049 } 1048 }
1050 return "Unsupported Type "~to!(String)(type); 1049 return "Unsupported Type "~String_valueOf(type);
1051 } 1050 }
1052 } 1051 }