Beispiel #1
0
void GBVCallOutline::load()
//----------------------------
// this code is cut-and-pasted from GTFUNC.CPP
// FIXME -- this should all be put back in one spot
{
    BusyNotice   busy( "Loading..." );
    TreeNodeList roots;
    int          i;

    _loadFilter->setSymType( KSTFunctions );
    TreeFuncNode::loadModule( NULL, dbManager()->module(), roots, _loadFilter );

    for( i = 0; i < roots.count(); i += 1 ) {
        TreeFuncNode * node = (TreeFuncNode *) roots[ i ];

        for( int j = 0; j < node->getCount( TreeNode::FlatList ); j += 1 ) {
            TreeFuncNode *pNode;
            pNode = (TreeFuncNode *) node->getNode( TreeNode::FlatList, j );
            if( pNode->getCount( TreeNode::ParentList ) == 0 ) {
                addLevel0( pNode );
            }
        }
    }

    for( i = 0; i < roots.count(); i += 1 ) {
        TreeFuncNode * node = (TreeFuncNode *) roots[ i ];

        node->deleteTree();
    }

    reset();
}
Beispiel #2
0
void TreeFuncWindow::fillRoots( void )
//------------------------------------
{
    TreeNodeList roots;
    int          i;

    _loadFilter->setSymType( KSTFunctions );
    TreeFuncNode::loadModule( this, dbManager()->module(), roots, _loadFilter );

    for( i = roots.count(); i > 0; i -= 1 ) {
        TreeFuncNode * node = (TreeFuncNode *) roots[ i - 1 ];
        for( int j = node->getCount( TreeNode::FlatList ); j > 0; j -= 1 ) {
            if( node->getNode( TreeNode::FlatList, j - 1 )->getLevel() == 0 ) {
                _roots.add( new TreeRoot( this, node->getNode( TreeNode::FlatList, j - 1 ) ) );
                break;
            }
        }
    }
}