[GME-commit] GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep
Dumper.cpp,1.32,1.33
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Mon Oct 30 22:36:02 CST 2006
Update of /project/gme-repository/GMESRC/Paradigms/MetaGME/MetaInterpreter2004/Rep
In directory escher:/tmp/cvs-serv25812/Rep
Modified Files:
Dumper.cpp
Log Message:
ModelReferences allowed to have as kindaspect the "Not specified" value in the Configure Aspect Mapping dialog.
In such a case no kindaspect value is dumped to xmp, and no registry value is stored, moreover, old registry value is cleared.
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.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Dumper.cpp 27 Oct 2006 21:17:45 -0000 1.32
--- Dumper.cpp 30 Oct 2006 22:35:59 -0000 1.33
***************
*** 16,19 ****
--- 16,23 ----
CAspectSpecDlg *theAspectDlg = 0;
+ // keep in sync with AspectSpecDlg.cpp's DUMPER_NOT_SPECIFIED_STR
+ #define DUMPER_NOT_SPECIFIED_STR "Not specified"
+
+
Sheet * Dumper::getInstance()
{
***************
*** 430,434 ****
skip = !primary_aspect_needed && !kind_aspect_needed; //continue
}
! else if ( is_ref_to_model)
{
const ReferenceRep * reference = dynamic_cast<const ReferenceRep*>( part.getFCOPtr());
--- 434,438 ----
skip = !primary_aspect_needed && !kind_aspect_needed; //continue
}
! else if ( 0 && is_ref_to_model) // do NOT skip any ref_to_model
{
const ReferenceRep * reference = dynamic_cast<const ReferenceRep*>( part.getFCOPtr());
***************
*** 489,493 ****
if ( kind_aspect_needed && (is_model || is_ref_to_model)) // is there need for kind_asp_name?
{
! default_kind_aspect_name = "No aspect"; kind_aspect_name = "N/A";
if (is_ref_to_model)
--- 493,497 ----
if ( kind_aspect_needed && (is_model || is_ref_to_model)) // is there need for kind_asp_name?
{
! default_kind_aspect_name = DUMPER_NOT_SPECIFIED_STR; kind_aspect_name = "N/A";
if (is_ref_to_model)
***************
*** 504,515 ****
else // if not then the first aspect is the default
{
! AspectRep * default_asp = reference->getFirstAspectFromIntersection();
! if ( default_asp)
! default_kind_aspect_name = default_asp->getName();
! else
{
// 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;
}
}
--- 508,526 ----
else // if not then the first aspect is the default
{
! // commented out on 11/2006, since we allow kindaspect to be left out from xmp in
! //AspectRep * default_asp = reference->getFirstAspectFromIntersection();
! //if ( default_asp)
! // default_kind_aspect_name = default_asp->getName();
! //else
! //{
! // // 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;
! //}
! if( asp_intersect.empty())
{
// 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; // not used anymore here
}
}
***************
*** 538,542 ****
}
}
! // at this point the default_kind_aspect_name either is valid or an error msg has been dumped
std::string regVal = "";
--- 549,553 ----
}
}
! // at this point the default_kind_aspect_name either is valid or == DUMPER_NOT_SPECIFIED_STR or an error msg has been dumped
std::string regVal = "";
***************
*** 725,730 ****
{
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";
--- 736,742 ----
{
act_part.setKindAspectPtr( 0);
! if( selected_kind_aspect_name == DUMPER_NOT_SPECIFIED_STR)
! { // do nothing, allowed to choose this specifically
! } //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";
More information about the GME-commit
mailing list