[Mobies-commit] [commit] r3707 - UDM/trunk/src/UIntWizVS/Templates/1033
ksmyth at redhat1.isis.vanderbilt.edu
ksmyth at redhat1.isis.vanderbilt.edu
Mon May 2 11:18:05 CDT 2011
Author: ksmyth
Date: Mon May 2 11:18:04 2011
New Revision: 3707
Log:
Use UdmGme::UdmId2GmeId instead of reimplementing it
Modified:
UDM/trunk/src/UIntWizVS/Templates/1033/UdmFormatter.cpp
Modified: UDM/trunk/src/UIntWizVS/Templates/1033/UdmFormatter.cpp
==============================================================================
--- UDM/trunk/src/UIntWizVS/Templates/1033/UdmFormatter.cpp Mon May 2 11:00:36 2011 (r3706)
+++ UDM/trunk/src/UIntWizVS/Templates/1033/UdmFormatter.cpp Mon May 2 11:18:04 2011 (r3707)
@@ -2,6 +2,7 @@
#include "UdmFormatter.h"
#include <sstream>
#include <iomanip>
+#include "UdmGme.h"
using namespace std;
@@ -9,12 +10,7 @@
{
std::string Formatter::MakeObjectHyperlink(const std::string & text, const Udm::Object& object)
{
- // Number magic, see uniqueId_type GmeObject::uniqueId() const
- unsigned long id = object.uniqueId(), c, p;
- p=id%100000000;
- c=id/100000000;
- c+=100;
- ostringstream ostr; ostr <<"<a href=\"mga:id-" << hex << setfill('0')<<setw(4) << c <<'-'<< setw(8)<< p << "\">" << text << "</a>";
+ ostr << "<a href=\"mga:" << UdmGme::UdmId2GmeId(object.uniqueId()) << "\">" << text << "</a>";
return ostr.str();
}
More information about the Mobies-commit
mailing list