model_server/project_file/src/projModule.cxx
// projModule::load_module_internal
//
// Load the module into memory - restore if needed otherwise import it
:load_module_internal
Load the module into memory - restore if needed otherwise import it
: load_module_internal Load the module into memory - restore if needed otherwise import it
appPtr projModule::load_module_internal(int do_import)
{
    Initialize (projModule::load_module_internal);
    appPtr ah = get_app();
    if (ah)
    {
        if (is_smtHeader(ah))
        {
            smtHeaderPtr smt = smtHeaderPtr(ah);
            if (smt->foreign && smt->parsed == 0) {
                obj_unload (smt);
		smt = NULL;
                ah  = NULL;
	    } else
		return ah;
        }
        else
            return ah;
    }
    ah = restore_module();
    if (!ah  && do_import)
      ah = import_module();
    if (ah) {
      projNode* proj_node = get_project();
      if(proj_node)
	{
	  projHeaderPtr proj_hdr = checked_cast(projHeader, proj_node->get_header());
	  if (proj_hdr)
            obj_insert(proj_hdr, REPLACE,proj_node,proj_node,NULL);
	}
      xref_notifier_report(0, this);
    }
    return ah;
}
appPtr projModule :: load_module_internal ( int do_import ) { Initialize ( projModule :: load_module_internal ) ; appPtr ah = get_app ( ) ; if ( ah ) { if ( is_smtHeader ( ah ) ) { smtHeaderPtr smt = smtHeaderPtr ( ah ) ; if ( smt -> foreign && smt -> parsed == 0 ) { obj_unload ( smt ) ; smt = NULL ; ah = NULL ; } else return ah ; } else return ah ; } ah = restore_module ( ) ; if ( ! ah && do_import ) ah = import_module ( ) ; if ( ah ) { projNode * proj_node = get_project ( ) ; if ( proj_node ) { projHeaderPtr proj_hdr = checked_cast ( projHeader , proj_node -> get_header ( ) ) ; if ( proj_hdr ) obj_insert ( proj_hdr , REPLACE , proj_node , proj_node , NULL ) ; } xref_notifier_report ( 0 , this ) ; } return ah ; }
projModule::load_module_internal
Load the module into memory - restore if needed otherwise import it
projModule :: load_module_internal Load the module into memory - restore if needed otherwise import it