[Mobies-commit] [commit] r4188 - UDM/trunk/src/UML GME/Interpreter
ksmyth at redhat3.isis.vanderbilt.edu
ksmyth at redhat3.isis.vanderbilt.edu
Fri Aug 30 09:04:35 CDT 2013
Author: ksmyth
Date: Fri Aug 30 09:04:34 2013
New Revision: 4188
Log:
Uml.xml defines cardinality 1 for association classes, so check that there arent multiple in Uml2Xml. See also GME-400
Modified:
UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp
Modified: UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp
==============================================================================
--- UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp Thu Aug 29 16:06:14 2013 (r4187)
+++ UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp Fri Aug 30 09:04:34 2013 (r4188)
@@ -1395,7 +1395,15 @@
ass.name() = (LPCTSTR) nm;
if(associationClass)
- ass.assocClass() = is_cross ? associationClass->GetCrossUmlClass() : associationClass->GetUmlClass();
+ {
+ Uml::Class assocClass = is_cross ? associationClass->GetCrossUmlClass() : associationClass->GetUmlClass();
+ if (static_cast<Uml::Association>(assocClass.association()))
+ {
+ throw udm_exception(std::string("Error: ") + static_cast<const char*>(association) + " cannot have more than 1 association class. "
+ "If two association classes are desired, use a superclass to define one.");
+ }
+ ass.assocClass() = assocClass;
+ }
::Uml::AssociationRole role = ::Uml::AssociationRole::Create(ass);
role.name() = (LPCTSTR) srcName;
More information about the Mobies-commit
mailing list