[GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep Dumper.cpp,1.31,1.32

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Fri Oct 27 22:17:47 CDT 2006


Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep
In directory escher:/tmp/cvs-serv18880/Rep

Modified Files:
	Dumper.cpp 
Log Message:
metainterpreter modified so that it will be more permissive in case of references and targetmodel aspects. It won't skip the aspect mapping dialog when the intersection of aspects, reference targets might have is empty. Will create a valid xmp, by not specifying kindaspect xml attribute for that part in the xmp file.

The output messages will be categorized as warnings rather than errors in the future.




CVS User: Zoltan Molnar, ISIS (zolmol)

Index: Dumper.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep/Dumper.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** Dumper.cpp	22 Sep 2006 22:27:13 -0000	1.31
--- Dumper.cpp	27 Oct 2006 21:17:45 -0000	1.32
***************
*** 510,514 ****
  								{
  									// error since the default selection failure means error ignoring what the registry value may have
! 									global_vars.err << MSG_ERROR << "Error: Reference \"" << reference->getPtr() << "\" has no valid aspect. Intersection of aspects the referred models might have is empty.\n";
  									aspect_selection_impossible = true;
  								}
--- 510,514 ----
  								{
  									// error since the default selection failure means error ignoring what the registry value may have
! 									global_vars.err << MSG_WARNING << "Warning: Reference \"" << reference->getPtr() << "\" has no valid aspect. Intersection of aspects the referred models might have is empty.\n";
  									aspect_selection_impossible = true;
  								}
***************
*** 533,537 ****
  								else
  								{
! 									global_vars.err << MSG_ERROR << "Error: Model \"" << sub_model->getPtr() << "\" has no valid aspect.\n";
  									aspect_selection_impossible = true;
  								}
--- 533,537 ----
  								else
  								{
! 									global_vars.err << MSG_WARNING << "Warning: Model \"" << sub_model->getPtr() << "\" has no valid aspect.\n";
  									aspect_selection_impossible = true;
  								}
***************
*** 616,620 ****
  		}
  	}
! 	if ( aspect_selection_impossible)
  	{
  		TO("Aspect selection not possible!");
--- 616,620 ----
  		}
  	}
! 	if ( 0 &&aspect_selection_impossible)
  	{
  		TO("Aspect selection not possible!");
***************
*** 723,727 ****
  				}
  				else // not found
! 					global_vars.err << MSG_ERROR << "Error: User selected aspect not found on sheet! Aspect \"" << act_asp_name << "\" Model \"" << act_mod_name << "\" Role \"" << act_role_name << "\" Selected aspect name: \"" << (LPCTSTR) selected_kind_aspect_name << "\".\n";
  			}
  			if ( ( act_part.getFCOPtr()->getMyKind() == Any::MODEL || act_part.getFCOPtr()->getMyKind() == Any::REF) && selected_kind_aspect_name == "N/A")
--- 723,744 ----
  				}
  				else // not found
! 				{
! 					act_part.setKindAspectPtr( 0);
! 					if( selected_kind_aspect_name == "No aspect")
! 						global_vars.err << MSG_WARNING << "Warning: Reference \"" << act_role_name << "\" can't be assigned a preferred aspect, since the intersection of target model aspects is empty.\n";
! 					else
! 						global_vars.err << MSG_WARNING << "Warning: User selected aspect not found on sheet! Aspect \"" << act_asp_name << "\" Model \"" << act_mod_name << "\" Role \"" << act_role_name << "\" Selected aspect name: \"" << (LPCTSTR) selected_kind_aspect_name << "\".\n";
! 
! 					// registering empty KindAspect value
! 					regPath = "/KindAspects/" + act_mod_name + ":" + act_role_name + "/" + act_asp_name;
! 					regVal = "";
! 
! 					// to erase the invalid value found
! 					try {
! 						act_part.getFCOPtr()->getMyRegistry()->setValueByPath( regPath, regVal);
! 					} catch(...) {
! 						global_vars.err << MSG_ERROR << "Internal error: Exception during registry related write operation.\n";
! 					}
! 				}
  			}
  			if ( ( act_part.getFCOPtr()->getMyKind() == Any::MODEL || act_part.getFCOPtr()->getMyKind() == Any::REF) && selected_kind_aspect_name == "N/A")



More information about the GME-commit mailing list