model_server/obj/src/objTree.h.cxx
// add this to be the parent of the list from t1a to t2a
// Step 1: The whole list is replaced by this.
// Step 2: The whole list is added to the tree as the child of this.
add this to be the parent of the list from t1a to t2a
Step 1: The whole list is replaced by this.
Step 2: The whole list is added to the tree as the child of this.
add this to be the parent of the list from t1a to t2a Step 1 : The whole list is replaced by this . Step 2 : The whole list is added to the tree as the child of this .
void objTree::add_parent_to_list(objTree *t1a, objTree *t2a)
{
    Initialize(objTree::add_parent_to_list);
    objTree *cr = t1a->get_parent();
    if (t1a->get_prev() == 0)
        cr->put_first_link(this);
    this->put_parent_link(cr);
    this->put_prev_link(t1a->get_prev());
    this->put_next_link(t2a->get_next());
    this->put_first_link(t1a);
    t1a->put_prev_link(0);
    t2a->put_next_link(0);
    cr = t1a;
    while(1)
    {
        cr->put_parent_link(this);
        if (cr == t2a)
            break;
        cr = cr->get_next();
    }
}
void objTree :: add_parent_to_list ( objTree * t1a , objTree * t2a ) { Initialize ( objTree :: add_parent_to_list ) ; objTree * cr = t1a -> get_parent ( ) ; if ( t1a -> get_prev ( ) == 0 ) cr -> put_first_link ( this ) ; this -> put_parent_link ( cr ) ; this -> put_prev_link ( t1a -> get_prev ( ) ) ; this -> put_next_link ( t2a -> get_next ( ) ) ; this -> put_first_link ( t1a ) ; t1a -> put_prev_link ( 0 ) ; t2a -> put_next_link ( 0 ) ; cr = t1a ; while ( 1 ) { cr -> put_parent_link ( this ) ; if ( cr == t2a ) break ; cr = cr -> get_next ( ) ; } }
add this to be the parent of the list from t1a to t2a
Step 1: The whole list is replaced by this.
add this to be the parent of the list from t1a to t2a Step 1 : The whole list is replaced by this .
// The next statement is not needed now because "this" is just created // by db_new before coming here. /* this->remove_from_tree(); */ /**********/ /* STEP 1 */ /**********/ /**********/ /* STEP 2 */ /**********/