Exemple #1
0
int VarTree::getIndex( const Iterator& item )
{
    int index = 0;
    Iterator it;
    for( it = m_flat ? firstLeaf() : m_children.begin();
         it != m_children.end();
         it = m_flat ? getNextLeaf( it ) : getNextVisibleItem( it ) )
    {
        if( it == item )
            break;
        index++;
    }
    return (it == item) ? index : -1;
}
Exemple #2
0
	// iterating all nodes
	inline Ref<Node> first() const { return firstLeaf(); }
Exemple #3
0
 /// Beginning of the children's list
 IteratorVisible begin()
 {
     return IteratorVisible(
            m_flat ? firstLeaf() : m_children.begin(), this );
 }