Changeset 424 in dev for trunk/abdev/BasicCompiler_Common/src/Class_Collect.cpp
- Timestamp:
- Mar 10, 2008, 5:39:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/Class_Collect.cpp
r409 r424 332 332 char className[VN_SIZE]; 333 333 Jenga::Common::Strings typeParameters; 334 SplitGenericClassInstance( temporary, className, typeParameters ); 334 Jenga::Common::Strings typeParameterBaseClassNames; 335 SplitGenericClassInstance( temporary, className, typeParameters, true, &typeParameterBaseClassNames ); 335 336 336 337 CClass *pobj_c = const_cast<CClass *>( this->Find(namespaceScopes, className) ); … … 353 354 ///////////////////////////////////////////////////////// 354 355 // ☆★☆ ジェネリクスサポート ☆★☆ 355 BOOST_FOREACH( const std::string &typeParameter, typeParameters ) 356 { 357 pobj_c->AddFormalGenericType( GenericType( typeParameter, Type(DEF_OBJECT,*GetObjectClassPtr()) ) ); 356 for( i2=0; i2<static_cast<int>(typeParameters.size()); i2++ ) 357 { 358 Type baseType( DEF_OBJECT, *GetObjectClassPtr() ); 359 if( typeParameterBaseClassNames[i2].size() ) 360 { 361 if( !compiler.StringToType( typeParameterBaseClassNames[i2], baseType ) ) 362 { 363 SetError(106,typeParameterBaseClassNames[i2],i); 364 } 365 else if( !baseType.IsObject() ) 366 { 367 SetError(106,typeParameterBaseClassNames[i2],i); 368 } 369 } 370 371 pobj_c->AddFormalGenericType( GenericType( typeParameters[i2], baseType ) ); 358 372 } 359 373 ///////////////////////////////////////////////////////// … … 527 541 char className[VN_SIZE]; 528 542 Jenga::Common::Strings typeParameters; 529 SplitGenericClassInstance( temporary, className, typeParameters ); 543 Jenga::Common::Strings typeParameterBaseClassNames; 544 SplitGenericClassInstance( temporary, className, typeParameters, true, &typeParameterBaseClassNames ); 530 545 531 546 CClass *pobj_c = const_cast<CClass *>( this->Find(namespaceScopes, className) ); … … 549 564 ///////////////////////////////////////////////////////// 550 565 // ☆★☆ ジェネリクスサポート ☆★☆ 551 BOOST_FOREACH( const std::string &typeParameter, typeParameters ) 552 { 553 pobj_c->AddFormalGenericType( GenericType( typeParameter, Type(DEF_OBJECT,*GetObjectClassPtr()) ) ); 566 for( i2=0; i2<static_cast<int>(typeParameters.size()); i2++ ) 567 { 568 Type baseType( DEF_OBJECT, *GetObjectClassPtr() ); 569 if( typeParameterBaseClassNames[i2].size() ) 570 { 571 if( !compiler.StringToType( typeParameterBaseClassNames[i2], baseType ) ) 572 { 573 SetError(106,typeParameterBaseClassNames[i2],i); 574 } 575 else if( !baseType.IsObject() ) 576 { 577 SetError(106,typeParameterBaseClassNames[i2],i); 578 } 579 } 580 581 pobj_c->AddFormalGenericType( GenericType( typeParameters[i2], baseType ) ); 554 582 } 555 583 /////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.