Changeset 73 in dev for BasicCompiler_Common/Class.cpp
- Timestamp:
- Mar 16, 2007, 11:07:14 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BasicCompiler_Common/Class.cpp
r71 r73 267 267 staticMembers.push_back( member ); 268 268 } 269 void CClass::AddMethod( S UBINFO*psi,DWORD dwAccess, bool isConst, BOOL bAbstract, BOOL bVirtual ){269 void CClass::AddMethod( SubInfo *psi,DWORD dwAccess, bool isConst, BOOL bAbstract, BOOL bVirtual ){ 270 270 CMethod *method = new CMethod(); 271 271 method->psi = psi; … … 278 278 methods.push_back( method ); 279 279 } 280 void CClass::AddStaticMethod(S UBINFO*psi,DWORD dwAccess){280 void CClass::AddStaticMethod(SubInfo *psi,DWORD dwAccess){ 281 281 CMethod *method = new CMethod(); 282 282 method->psi=psi; … … 322 322 return 0; 323 323 } 324 CMethod *CClass::GetMethodInfo( S UBINFO*psi ){324 CMethod *CClass::GetMethodInfo( SubInfo *psi ){ 325 325 for( int i=(int)methods.size()-1; i>=0; i-- ){ 326 326 if( psi == methods[i]->psi ) return methods[i]; … … 328 328 return NULL; 329 329 } 330 CMethod *CClass::GetStaticMethodInfo( S UBINFO*psi ){330 CMethod *CClass::GetStaticMethodInfo( SubInfo *psi ){ 331 331 for( int i=(int)staticMethods.size()-1; i>=0; i-- ){ 332 332 if( psi == staticMethods[i]->psi ) return staticMethods[i]; … … 347 347 } 348 348 349 void CClass::EnumStaticMethod( const char *methodName, std::vector<S UBINFO*> &subs ) const349 void CClass::EnumStaticMethod( const char *methodName, std::vector<SubInfo *> &subs ) const 350 350 { 351 351 foreach( CMethod *method, staticMethods ){ … … 356 356 } 357 357 358 void CClass::EnumMethod( const char *methodName, std::vector<S UBINFO*> &subs ) const358 void CClass::EnumMethod( const char *methodName, std::vector<SubInfo *> &subs ) const 359 359 { 360 360 //オブジェクトのメンバ関数の場合 … … 367 367 } 368 368 369 void CClass::EnumMethod( const BYTE idOperatorCalc, std::vector<S UBINFO*> &subs ) const369 void CClass::EnumMethod( const BYTE idOperatorCalc, std::vector<SubInfo *> &subs ) const 370 370 { 371 371 //オブジェクトのメンバ関数の場合 372 372 //※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う 373 373 for( int i=(int)methods.size()-1; i>=0; i-- ){ 374 S UBINFO*psi = methods[i]->psi;374 SubInfo *psi = methods[i]->psi; 375 375 char *temp = psi->name; 376 376 if(temp[0]==1&&temp[1]==ESC_OPERATOR){ … … 508 508 509 509 510 int CClass::GetFuncNumInVtbl( const S UBINFO*psi ) const510 int CClass::GetFuncNumInVtbl( const SubInfo *psi ) const 511 511 { 512 512 int n = 0; … … 527 527 ////////////////////////////////////// 528 528 529 S UBINFO**ppsi;530 ppsi=(S UBINFO **)HeapAlloc(hHeap,0,vtbl_num*sizeof(SUBINFO*));529 SubInfo **ppsi; 530 ppsi=(SubInfo **)HeapAlloc(hHeap,0,vtbl_num*sizeof(SubInfo *)); 531 531 532 532 //関数テーブルに値をセット … … 565 565 int i; 566 566 for(i=0;i<vtbl_num;i++){ 567 S UBINFO*psi;568 psi=(S UBINFO*)pVtbl[i];567 SubInfo *psi; 568 psi=(SubInfo *)pVtbl[i]; 569 569 if(!psi) continue; 570 570 pVtbl[i]=psi->CompileAddress+ImageBase+MemPos_CodeSection; … … 835 835 836 836 //関数ハッシュへ登録 837 S UBINFO*psi;837 SubInfo *psi; 838 838 psi=AddSubData(buffer,NowLine,bVirtual,pobj_c,bStatic); 839 839 if(!psi) return; … … 849 849 850 850 //標準コンストラクタ(引数なし) 851 if(psi-> ParmNum==0) fConstructor=1;851 if(psi->params.size()==0) fConstructor=1; 852 852 853 853 //強制的にConst修飾子をつける … … 894 894 895 895 if(lstrcmp(temporary,method->psi->name)==0){ 896 if(CompareParameter( 897 method->psi->pParmInfo,method->psi->ParmNum, 898 psi->pParmInfo,psi->ParmNum 899 )==0){ 896 if( Parameter::Equals( method->psi->params, psi->params ) ){ 900 897 //関数名、パラメータ属性が合致したとき 901 898 SetError(15,psi->name,NowLine); … … 911 908 foreach( CMethod *method, pobj_c->methods ){ 912 909 if(lstrcmp(temporary,method->psi->name)==0){ 913 if(CompareParameter( 914 method->psi->pParmInfo,method->psi->ParmNum, 915 psi->pParmInfo,psi->ParmNum 916 )==0){ 910 if( Parameter::Equals( method->psi->params, psi->params ) ){ 917 911 918 912 if(method->psi->bVirtual){ … … 1444 1438 } 1445 1439 1446 void CDBClass::StartCompile( S UBINFO*psi ){1440 void CDBClass::StartCompile( SubInfo *psi ){ 1447 1441 pCompilingClass = psi->pobj_ParentClass; 1448 1442 if( pCompilingClass ){
Note:
See TracChangeset
for help on using the changeset viewer.