Changeset 387 in dev for trunk/abdev/BasicCompiler_Common/src/Class.cpp
- Timestamp:
- Feb 11, 2008, 12:06:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r384 r387 1151 1151 //////////////////////////////////////////////////////////////////// 1152 1152 1153 char temporary[ VN_SIZE];1153 char temporary[8192]; 1154 1154 sprintf(temporary, "%c%ctempType=Nothing%c%cTypeBaseImpl" 1155 1155 , HIBYTE( COM_DIM ) … … 1175 1175 , "tempType=Search(\"%s\")" 1176 1176 , objClass.GetFullName().c_str() 1177 1177 ); 1178 1178 1179 1179 // コンパイル … … 1183 1183 , "tempType.SetBaseType(Search(\"%s\"))" 1184 1184 , objClass.GetSuperClass().GetFullName().c_str() 1185 1185 ); 1186 1186 1187 1187 // コンパイル 1188 1188 ChangeOpcode( temporary ); 1189 } 1190 } 1191 1192 1193 1194 //////////////////////////////////////////////////////////////////// 1195 // 継承関係登録 1196 //////////////////////////////////////////////////////////////////// 1197 // TODO: 未完成 1198 /* 1199 1200 // イテレータをリセット 1201 Iterator_Reset(); 1202 1203 while( Iterator_HasNext() ){ 1204 CClass *pClass = Iterator_GetNext(); 1205 1206 sprintf( genBuffer + length 1207 , "obj.Search( \"%s\" ).SetBaseType( Search( \"%s\" ) ):" 1208 , "" // クラス名 1209 , pClass->name // クラス名 1189 1190 1191 // メンバの型を示すTypeInfoオブジェクトへのDataOffset配列の静的データ定義文字列を取得 1192 sprintf( 1193 temporary, 1194 "tempType.SetMemberTypes([%s],[%s],%d)", 1195 objClass.GetStaticDefiningStringAsMemberNames().c_str(), 1196 objClass.GetStaticDefiningStringAsMemberTypeInfoNames().c_str(), 1197 objClass.GetDynamicMembers().size() 1210 1198 ); 1211 length += lstrlen( genBuffer + length ); 1212 1213 while( length + 8192 > max ){ 1214 max += 8192; 1215 genBuffer = (char *)realloc( genBuffer, max ); 1216 } 1217 }*/ 1199 ChangeOpcode( temporary ); 1200 } 1201 } 1218 1202 } 1219 1203 … … 1347 1331 return pInterfaceInfo; 1348 1332 } 1333 1334 std::string CClass::GetStaticDefiningStringAsMemberNames() const 1335 { 1336 std::string result; 1337 1338 BOOST_FOREACH( const CMember *pMember, dynamicMembers ) 1339 { 1340 if( result.size() ) 1341 { 1342 result += ","; 1343 } 1344 1345 result += "\"" + pMember->GetName() + "\""; 1346 } 1347 1348 return result; 1349 } 1350 std::string CClass::GetStaticDefiningStringAsMemberTypeInfoNames() const 1351 { 1352 std::string result; 1353 1354 BOOST_FOREACH( const CMember *pMember, dynamicMembers ) 1355 { 1356 if( result.size() ) 1357 { 1358 result += ","; 1359 } 1360 1361 result += "\"" + compiler.TypeToString( pMember->GetType() ) + "\""; 1362 } 1363 1364 return result; 1365 } 1366
Note:
See TracChangeset
for help on using the changeset viewer.