[MOAB-dev] r4020 - MOAB/trunk/tools/dagmc
sjackson at cae.wisc.edu
sjackson at cae.wisc.edu
Tue Jun 29 16:52:12 CDT 2010
Author: sjackson
Date: 2010-06-29 16:52:12 -0500 (Tue, 29 Jun 2010)
New Revision: 4020
Modified:
MOAB/trunk/tools/dagmc/DagMC.cpp
MOAB/trunk/tools/dagmc/DagMC.hpp
Log:
Move DagMC version reporting functions out of DagMC.hpp header file.
There was no good reason for these static functions to be inline:
they certainly don't need to be fast.
Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp 2010-06-25 22:41:23 UTC (rev 4019)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp 2010-06-29 21:52:12 UTC (rev 4020)
@@ -66,6 +66,25 @@
}
+float DagMC::version(std::string *version_string)
+{
+ if (NULL != version_string)
+ *version_string = std::string("DagMC version ") + std::string(DAGMC_VERSION_STRING);
+ return DAGMC_VERSION;
+}
+
+unsigned int DagMC::interface_revision()
+{
+ unsigned int result = 0;
+ const char* interface_string = DAGMC_INTERFACE_REVISION;
+ if( strlen(interface_string) >= 5 ){
+ // start looking for the revision number after "$Rev: "
+ result = strtol( interface_string+5, NULL, 10 );
+ }
+ return result;
+}
+
+
const bool debug = false;
DagMC::DagMC(Interface *mb_impl)
: mbImpl(mb_impl), obbTree(mb_impl), have_cgm_geom(false)
Modified: MOAB/trunk/tools/dagmc/DagMC.hpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.hpp 2010-06-25 22:41:23 UTC (rev 4019)
+++ MOAB/trunk/tools/dagmc/DagMC.hpp 2010-06-29 21:52:12 UTC (rev 4020)
@@ -7,8 +7,6 @@
#include <vector>
#include <string>
#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
#include "moab/OrientedBoxTreeTool.hpp"
@@ -398,25 +396,6 @@
return instance_;
}
-inline float DagMC::version(std::string *version_string)
-{
- if (NULL != version_string)
More information about the moab-dev
mailing list