model_server/dd/src/ddict.h.cxx
// delete all element except of kind k (currently used for macro -- may not need though)
delete all element except of kind k (currently used for macro -- may not need though)
delete all element except of kind k ( currently used for macro -- may not need though )
void ddRoot::tidy_els(ddKind k)
{
  Initialize(ddRoot::tidy_els);
  hash_element* hen;
  for (int i = 0; i < MAX_HASH; ++i ) {
    hash_element* he = dd_hash[i];
    while (he) {
      hen = he->next;
      ddElement* dd = he->el;
      if (dd && (dd->get_kind() == k || user_ddKind(dd->get_kind()))) {
	if (dd->get_kind() == DD_CLASS || dd->get_kind() == DD_UNION ||
	    dd->get_kind() == DD_ENUM) {
	  if (dd->get_first())
	    dd->splice();
	}
	else
	  dd->remove_from_tree();
	start_transaction() {      
	  remove_hash(he, i);
	  obj_delete(dd);
	}end_transaction();
	he = hen;
      }
    }
  }
}
void ddRoot :: tidy_els ( ddKind k ) { Initialize ( ddRoot :: tidy_els ) ; hash_element * hen ; for ( int i = 0 ; i < MAX_HASH ; ++ i ) { hash_element * he = dd_hash [ i ] ; while ( he ) { hen = he -> next ; ddElement * dd = he -> el ; if ( dd && ( dd -> get_kind ( ) == k || user_ddKind ( dd -> get_kind ( ) ) ) ) { if ( dd -> get_kind ( ) == DD_CLASS || dd -> get_kind ( ) == DD_UNION || dd -> get_kind ( ) == DD_ENUM ) { if ( dd -> get_first ( ) ) dd -> splice ( ) ; } else dd -> remove_from_tree ( ) ; start_transaction ( ) { remove_hash ( he , i ) ; obj_delete ( dd ) ; } end_transaction ( ) ; he = hen ; } } } }
delete all element except of kind k (currently used for macro -- may not need though)
delete all element except of kind k ( currently used for macro -- may not need though )