Esempio n. 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();
}
Esempio n. 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;
            }
        }
    }
}
Esempio n. 3
0
void TreeFuncNode::loadModule( TreeFuncWindow * prt, Module * mod,
                               TreeNodeList& roots, KeySymbol * key )
//-------------------------------------------------------------------
{
    FuncSearchData data;

    data.mod =  mod;
    data.roots = &roots;
    data.parentWin = prt;
    data.key = key;

    #if DEBUG
    data.funcsFound = 0;
    #endif

    DRReferencedSymbols( DR_SYM_FUNCTION, &data, TreeFuncHook );

    for( int i = roots.count(); i > 0; i -= 1 ) {
        ((TreeCycleNode *)roots[ i - 1 ])->breakCycles();
        ((TreeCycleNode *)roots[ i - 1 ])->assignLevels();
    }
}