comparison lphobos/internal/objectimpl.d @ 113:27b9f749d9fe trunk

[svn r117] Initial working implementation of interfaces. Groundwork for all the different types of class/interface casts laid out.
author lindquist
date Sat, 24 Nov 2007 06:33:00 +0100
parents 5b5194b25f33
children fd7ad91fd713
comparison
equal deleted inserted replaced
112:368547b1cbe6 113:27b9f749d9fe
877 } 877 }
878 878
879 ClassInfo info; 879 ClassInfo info;
880 } 880 }
881 881
882 /+
883
884 class TypeInfo_Interface : TypeInfo 882 class TypeInfo_Interface : TypeInfo
885 { 883 {
886 char[] toString() { return info.name; } 884 char[] toString() { return info.name; }
887 885
888 int opEquals(Object o) 886 int opEquals(Object o)
941 939
942 uint flags() { return 1; } 940 uint flags() { return 1; }
943 941
944 ClassInfo info; 942 ClassInfo info;
945 } 943 }
946
947 +/
948 944
949 class TypeInfo_Struct : TypeInfo 945 class TypeInfo_Struct : TypeInfo
950 { 946 {
951 char[] toString() { return name; } 947 char[] toString() { return name; }
952 948
1036 char[] function(void*) xtoString; 1032 char[] function(void*) xtoString;
1037 1033
1038 uint m_flags; 1034 uint m_flags;
1039 } 1035 }
1040 1036
1041 /+
1042
1043 class TypeInfo_Tuple : TypeInfo 1037 class TypeInfo_Tuple : TypeInfo
1044 { 1038 {
1045 TypeInfo[] elements; 1039 TypeInfo[] elements;
1046 1040
1047 char[] toString() 1041 char[] toString()
1099 void swap(void *p1, void *p2) 1093 void swap(void *p1, void *p2)
1100 { 1094 {
1101 assert(0); 1095 assert(0);
1102 } 1096 }
1103 } 1097 }
1104
1105 +/
1106 1098
1107 class TypeInfo_Const : TypeInfo 1099 class TypeInfo_Const : TypeInfo
1108 { 1100 {
1109 char[] toString() { return "const " ~ base.toString(); } 1101 char[] toString() { return "const " ~ base.toString(); }
1110 1102