model_server/driver_aset/src/driver.cxx
// Put reference to the selected objects on the scrapbook
Put reference to the selected objects on the scrapbook
Put reference to the selected objects on the scrapbook
void driver::reference (viewPtr view_p)
{
    Initialize(driver::reference);
    objArr selected_nodes;
    start_transaction(){
	update_selection (view_p, 0);
	fill_array_with_selected_appnodes (NULL, selected_nodes);
	boolean success = 0;
    {
	RelationalPtr relational_node = RelationalPtr(selected_nodes[0]);
	if (is_steTextNode(relational_node))
	{
	    scrapbook_instance->reference(selected_nodes);
	    success = 1;
	}
	else if (is_smtTree(relational_node))
	{
	    scrapbook_instance->reference(selected_nodes);
	    success = 1;
	}
    }
	if (success)
	{
	    unselect ( checked_cast(view, NULL) );
	}
	else
	    dis_message (C_DRIVER, MSG_ERROR, "M_NOSELECTIONCOPY");
    } end_transaction();
    return;
}
void driver :: reference ( viewPtr view_p ) { Initialize ( driver :: reference ) ; objArr selected_nodes ; start_transaction ( ) { update_selection ( view_p , 0 ) ; fill_array_with_selected_appnodes ( NULL , selected_nodes ) ; boolean success = 0 ; { RelationalPtr relational_node = RelationalPtr ( selected_nodes [ 0 ] ) ; if ( is_steTextNode ( relational_node ) ) { scrapbook_instance -> reference ( selected_nodes ) ; success = 1 ; } else if ( is_smtTree ( relational_node ) ) { scrapbook_instance -> reference ( selected_nodes ) ; success = 1 ; } } if ( success ) { unselect ( checked_cast ( view , NULL ) ) ; } else dis_message ( C_DRIVER , MSG_ERROR , " " ) ; } end_transaction ( ) ; return ; }
Put reference to the selected objects on the scrapbook
Put reference to the selected objects on the scrapbook
//    // Structured selections only for now //    // restricted to a single structured node for now //    if (selected_nodes.size() == 1) // Check the type of the single node (STE or SMT only) //		// Pass in the array containing the single node //		// Pass in the array containing the single node // clear selection here