[Mobies-commit] [commit] r3600 - in UDM/trunk: Projects/Win32/VC10/tests/test_refports Projects/Win32/VC9/tests/test_refports src/Udm

endre at redhat1.isis.vanderbilt.edu endre at redhat1.isis.vanderbilt.edu
Wed Jan 5 01:17:35 CST 2011


Author: endre
Date: Wed Jan  5 01:17:34 2011
New Revision: 3600

Log:
Remove Udm parameter --assoc-wrphelper, the helpers should now be extracted automatically from metamodel.

Modified:
   UDM/trunk/Projects/Win32/VC10/tests/test_refports/test_refports.vcxproj
   UDM/trunk/Projects/Win32/VC9/tests/test_refports/test_refports.vcproj
   UDM/trunk/src/Udm/ClassGen.cpp
   UDM/trunk/src/Udm/Udm.cpp
   UDM/trunk/src/Udm/Udm.h

Modified: UDM/trunk/Projects/Win32/VC10/tests/test_refports/test_refports.vcxproj
==============================================================================
--- UDM/trunk/Projects/Win32/VC10/tests/test_refports/test_refports.vcxproj	Wed Jan  5 01:09:47 2011	(r3599)
+++ UDM/trunk/Projects/Win32/VC10/tests/test_refports/test_refports.vcxproj	Wed Jan  5 01:17:34 2011	(r3600)
@@ -132,13 +132,13 @@
     <CustomBuild Include="..\..\..\..\..\Build\Win32\VC10\Release\Gen\tests\test_refports\RefPort_udm.xml">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Generating UDM API files</Message>
-      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(OutDir)Udm.exe" -o "$(OutDir)Gen\tests\test_refports" "%(FullPath)" --assoc-wrphelper C
+      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(OutDir)Udm.exe" -o "$(OutDir)Gen\tests\test_refports" "%(FullPath)"
 </Command>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(OutDir)Gen\tests\test_refports\RefPort.h;$(OutDir)Gen\tests\test_refports\RefPort.cpp;$(OutDir)Gen\tests\test_refports\RefPort.xsd;%(Outputs)</Outputs>
     </CustomBuild>
     <CustomBuild Include="..\..\..\..\..\Build\Win32\VC10\Debug\Gen\tests\test_refports\RefPort_udm.xml">
       <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating UDM API files</Message>
-      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(OutDir)UdmD.exe" -o "$(OutDir)Gen\tests\test_refports" "%(FullPath)" --assoc-wrphelper C
+      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(OutDir)UdmD.exe" -o "$(OutDir)Gen\tests\test_refports" "%(FullPath)"
 </Command>
       <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(OutDir)Gen\tests\test_refports\RefPort.h;$(OutDir)Gen\tests\test_refports\RefPort.cpp;$(OutDir)Gen\tests\test_refports\RefPort.xsd;%(Outputs)</Outputs>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@@ -175,4 +175,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>

Modified: UDM/trunk/Projects/Win32/VC9/tests/test_refports/test_refports.vcproj
==============================================================================
--- UDM/trunk/Projects/Win32/VC9/tests/test_refports/test_refports.vcproj	Wed Jan  5 01:09:47 2011	(r3599)
+++ UDM/trunk/Projects/Win32/VC9/tests/test_refports/test_refports.vcproj	Wed Jan  5 01:17:34 2011	(r3600)
@@ -273,7 +273,7 @@
 				<Tool
 					Name="VCCustomBuildTool"
 					Description="Generating UDM API files"
-					CommandLine="&quot;$(OutDir)\UdmD.exe&quot; -o &quot;$(OutDir)\Gen\tests\test_refports&quot; &quot;$(InputPath)&quot; --assoc-wrphelper C&#x0D;&#x0A;"
+					CommandLine="&quot;$(OutDir)\UdmD.exe&quot; -o &quot;$(OutDir)\Gen\tests\test_refports&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
 					Outputs="$(OutDir)\Gen\tests\test_refports\RefPort.h;$(OutDir)\Gen\tests\test_refports\RefPort.cpp;$(OutDir)\Gen\tests\test_refports\RefPort.xsd"
 				/>
 			</FileConfiguration>
@@ -303,7 +303,7 @@
 				<Tool
 					Name="VCCustomBuildTool"
 					Description="Generating UDM API files"
-					CommandLine="&quot;$(OutDir)\Udm.exe&quot; -o &quot;$(OutDir)\Gen\tests\test_refports&quot; &quot;$(InputPath)&quot; --assoc-wrphelper C&#x0D;&#x0A;"
+					CommandLine="&quot;$(OutDir)\Udm.exe&quot; -o &quot;$(OutDir)\Gen\tests\test_refports&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
 					Outputs="$(OutDir)\Gen\tests\test_refports\RefPort.h;$(OutDir)\Gen\tests\test_refports\RefPort.cpp;$(OutDir)\Gen\tests\test_refports\RefPort.xsd"
 				/>
 			</FileConfiguration>

Modified: UDM/trunk/src/Udm/ClassGen.cpp
==============================================================================
--- UDM/trunk/src/Udm/ClassGen.cpp	Wed Jan  5 01:09:47 2011	(r3599)
+++ UDM/trunk/src/Udm/ClassGen.cpp	Wed Jan  5 01:17:34 2011	(r3600)
@@ -897,10 +897,6 @@
 	::Uml::Association assoc = c.association();
 	if(assoc) 
 	{
-		bool generate_rphelper_chains = false;
-		if (gen.opts.assoc_wrphelper_names.find(assoc.getPath2("::", false)) != gen.opts.assoc_wrphelper_names.end())
-			generate_rphelper_chains = true;
-
 		set< ::Uml::AssociationRole> assocs = assoc.roles();
 
 		// connect to the association (by using the parent() of first association role)
@@ -935,16 +931,14 @@
 
 				::Uml::AssociationRole orp_helper = the_other.rp_helper();
 				if (orp_helper) {
-					string orp_helper_name = ::Uml::MakeRoleName(orp_helper);
-					meta_init_links.push_back( boost::format("%1%::meta_%2%_end_.rp_helper() = %1%::meta_%3%") % cl_name % orel_name % orp_helper_name );
-				}
-
-				if (generate_rphelper_chains)
-				{
 					typedefs.push_back( boost::format("typedef pair< %1%, vector<Udm::Object> > %2%_chain_t") % tclass_cpp_name % rel_name );
 					meth_defs.push_back( boost::format("Udm::AssocEndChainAttr< %1%, %2%_chain_t > %2%_chain() const { return Udm::AssocEndChainAttr< %1%, %2%_chain_t >(impl, meta_%2%_end_); }") % tclass_cpp_name % rel_name );
+
+					string orp_helper_name = ::Uml::MakeRoleName(orp_helper);
+					meta_init_links.push_back( boost::format("%1%::meta_%2%_end_.rp_helper() = %1%::meta_%3%") % cl_name % orel_name % orp_helper_name );
 				}
 
+				
 				if (gen.opts.mode == UdmOpts::CXX_GENERIC)
 				{
 					aclass_tlhlp.roles2type.push_back( boost::format("class ACE_%1% {}") % rel_name );

Modified: UDM/trunk/src/Udm/Udm.cpp
==============================================================================
--- UDM/trunk/src/Udm/Udm.cpp	Wed Jan  5 01:09:47 2011	(r3599)
+++ UDM/trunk/src/Udm/Udm.cpp	Wed Jan  5 01:17:34 2011	(r3600)
@@ -56,7 +56,6 @@
 "             d: All classes from a diagram and its sub-namespaces into a single .cpp\n"
 "             n: All classes from a namespace into a single .cpp\n"
 "  -o <Output directory>\n"
-"  --assoc-wrphelper <Association name> Name of association with reference port helper associations\n"
 "\n"
 "C++ options:\n"
 "  -v Support for C++ visitor pattern\n"
@@ -153,14 +152,6 @@
 						opts.mode = UdmOpts::CXX_GENERIC;
 						continue;
 					}
-					if (!string("assoc-wrphelper").compare(argv[argn] + 2))
-					{
-						if(++argn >= argc)
-							throw udm_exception(udm_usage);
-						string assoc_name = argv[argn];
-						opts.assoc_wrphelper_names.insert(assoc_name);
-						continue;
-					}
 				}
 				
 				char *optp;

Modified: UDM/trunk/src/Udm/Udm.h
==============================================================================
--- UDM/trunk/src/Udm/Udm.h	Wed Jan  5 01:09:47 2011	(r3599)
+++ UDM/trunk/src/Udm/Udm.h	Wed Jan  5 01:17:34 2011	(r3600)
@@ -74,8 +74,6 @@
 
 	// Output directory
 	string out_dir;
-
-	set<string> assoc_wrphelper_names;
 };
 
 // not cross-link approved


More information about the Mobies-commit mailing list