Changeset 348 in dev for trunk/abdev/BasicCompiler_Common/src/Class.cpp
- Timestamp:
- Oct 12, 2007, 3:25:54 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/src/Class.cpp
r347 r348 817 817 } 818 818 819 int CClass::GetVtblMasterListIndex( const UserProc *pUserProc ) const 820 { 821 int index = 0; 819 void CClass::GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const 820 { 821 vtblMasterListIndex = 0; 822 823 vtblIndex = 0; 822 824 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){ 823 825 if( &pMethod->GetUserProc() == pUserProc ) 824 826 { 825 return index; 827 return; 828 } 829 830 if( pMethod->IsVirtual() ) 831 { 832 vtblIndex++; 826 833 } 827 834 } … … 829 836 BOOST_FOREACH( const ::Interface *pInterface, interfaces ) 830 837 { 831 index++; 832 838 vtblMasterListIndex++; 839 840 vtblIndex = 0; 833 841 BOOST_FOREACH( const CMethod *pMethod, pInterface->GetDynamicMethods() ){ 834 842 if( &pMethod->GetUserProc() == pUserProc ) 835 843 { 836 return index; 844 return; 845 } 846 847 if( pMethod->IsVirtual() ) 848 { 849 vtblIndex++; 837 850 } 838 851 } … … 840 853 841 854 SetError(); 842 return 0; 843 } 844 int CClass::GetFuncNumInVtbl( const UserProc *pUserProc ) const 845 { 846 int n = 0; 847 BOOST_FOREACH( const CMethod *pMethod, GetDynamicMethods() ){ 848 if( &pMethod->GetUserProc() == pUserProc ) break; 849 if( pMethod->IsVirtual() ) n++; 850 } 851 return n; 855 return; 852 856 } 853 857 long CClass::GetVtblMasterListOffset() const … … 1523 1527 } 1524 1528 1525 if( pobj_c->GetName() == "Object" || dwClassType == ESC_TYPE ){ 1529 if( pobj_c->GetName() == "Object" 1530 || pobj_c->GetFullName() == "ActiveBasic.Core.InterfaceInfo" 1531 || dwClassType == ESC_TYPE ) 1532 { 1533 // 何も継承しない 1534 1526 1535 if( &pobj_c->GetSuperClass() || pobj_c->GetVtblNum() ) 1527 1536 {
Note:
See TracChangeset
for help on using the changeset viewer.