| 572 | } |
| 573 | |
| 574 | bool CReClassExApp::IsNodeValid( CNodeBase* pCheckNode ) |
| 575 | { |
| 576 | for (UINT i = 0; i < m_Classes.size( ); i++) |
| 577 | { |
| 578 | for (UINT n = 0; n < m_Classes[i]->NodeCount( ); n++) |
| 579 | { |
| 580 | CNodeBase* pNode = m_Classes[i]->GetNode( n ); |
| 581 | if (pNode == pCheckNode) |
| 582 | return true; |
| 583 | |
| 584 | NodeType nt = pNode->GetType( ); |
| 585 | if (nt == nt_vtable) |
| 586 | { |
| 587 | CNodeVTable* pVTable = (CNodeVTable*)pNode; |
| 588 | for (UINT f = 0; f < pVTable->NodeCount( ); f++) |
| 589 | { |
| 590 | if (pVTable->GetNode( f ) == pCheckNode) |
| 591 | return true; |
| 592 | } |
| 593 | } |
| 594 | if (nt == nt_array) |
| 595 | { |
| 596 | CNodeArray* pArray = (CNodeArray*)pNode; |
| 597 | if (pArray->GetClass( ) == pCheckNode) |
| 598 | return true; |
| 599 | } |
| 600 | if (nt == nt_pointer) |
| 601 | { |
| 602 | CNodePtr* pPtr = (CNodePtr*)pNode; |
| 603 | if (pPtr->GetClass( ) == pCheckNode) |
| 604 | return true; |
| 605 | } |
| 606 | } |
| 607 | } |
| 608 | return false; |
| 609 | } |
| 610 | |
| 611 | |
| 612 | //////////////// OnButtonNewClass ///////////////// |