model_server/dd/src/ddict.h.cxx
// Add the element into dd_root (according to kind) and connect it to 
// local hash table.
Add the element into dd_root (according to kind) and connect it to
local hash table.
Add the element into dd_root ( according to kind ) and connect it to local hash table .
ddElementPtr ddRoot::add_def(ddKind knd, int nl, char const *ns,
			     int dl, char const *ds, int al, char const *an)
{
  Initialize(ddRoot::add_def);
  ddElementPtr ep = NULL;
  if (ep = lookup( knd, ns)) {
  }
  if(ep){
    if (ep->is_expect_friend())
      ep->clear_expect_friend();
  }
  else {
    ep = new ddElement(knd, ns, nl, ds, dl, an, al);
    insert(ep, knd);
    insert_hash(ep);
  }
  app* h = checked_cast(app, get_relation(smtHeader_of_ddRoot, this));
  if(h && is_smtHeader(h))
        ep->language = h->language;
  ep->set_xref_hash(h);
  if (dd_can_have_ref_file(ep->get_kind())) {
    put_dd_ref_file(ep);
  }
  return(ep);
}
ddElementPtr ddRoot :: add_def ( ddKind knd , int nl , char const * ns , int dl , char const * ds , int al , char const * an ) { Initialize ( ddRoot :: add_def ) ; ddElementPtr ep = NULL ; if ( ep = lookup ( knd , ns ) ) { } if ( ep ) { if ( ep -> is_expect_friend ( ) ) ep -> clear_expect_friend ( ) ; } else { ep = new ddElement ( knd , ns , nl , ds , dl , an , al ) ; insert ( ep , knd ) ; insert_hash ( ep ) ; } app * h = checked_cast ( app , get_relation ( smtHeader_of_ddRoot , this ) ) ; if ( h && is_smtHeader ( h ) ) ep -> language = h -> language ; ep -> set_xref_hash ( h ) ; if ( dd_can_have_ref_file ( ep -> get_kind ( ) ) ) { put_dd_ref_file ( ep ) ; } return ( ep ) ; }
Add the element into dd_root (according to kind) and connect it to
local hash table.
Add the element into dd_root ( according to kind ) and connect it to local hash table .