| 969 | } |
| 970 | |
| 971 | Uint32 Node::getNodeOfTypeIndex() const { |
| 972 | Uint32 nodeIndex = 0; |
| 973 | Uint32 type = getType(); |
| 974 | if ( NULL != mParentNode ) { |
| 975 | Node* parentChild = mParentNode->mChild; |
| 976 | while ( parentChild != NULL ) { |
| 977 | if ( parentChild == this ) |
| 978 | return nodeIndex; |
| 979 | if ( parentChild->getType() == type ) |
| 980 | nodeIndex++; |
| 981 | parentChild = parentChild->mNext; |
| 982 | }; |
| 983 | } |
| 984 | return nodeIndex; |
| 985 | } |
| 986 | |
| 987 | Node* Node::getFirstChild() const { |
| 988 | return mChild; |