Revision: 44651
http://brlcad.svn.sourceforge.net/brlcad/?rev=44651&view=rev
Author: davidloman
Date: 2011-05-23 12:57:07 +0000 (Mon, 23 May 2011)
Log Message:
-----------
Cleaned up console/debug printing calls.
Modified Paths:
--------------
geomcore/trunk/src/GS/FileDataSource.cxx
geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx
Modified: geomcore/trunk/src/GS/FileDataSource.cxx
===================================================================
--- geomcore/trunk/src/GS/FileDataSource.cxx 2011-05-20 18:52:06 UTC (rev
44650)
+++ geomcore/trunk/src/GS/FileDataSource.cxx 2011-05-23 12:57:07 UTC (rev
44651)
@@ -46,8 +46,6 @@
std::string absPath = "";
FileDataSource::buildFullPath(&absPath, &this->repoPath, &path);
-
-
}
/* Get a set of BRLCAD::MinimalObjects */
@@ -58,7 +56,6 @@
FileDataSource::buildFullPath(&absPath, &this->repoPath, &relPath);
-
//figure out what kind of path we are dealing with;
if (this->existsFileOrDir(absPath.c_str()) == 0)
return NULL;
@@ -153,7 +150,6 @@
}
}
-
int
FileDataSource::walkPath(std::string path)
{
@@ -186,7 +182,7 @@
pathSoFar += pathStep;
ford = FileDataSource::existsFileOrDir(pathSoFar.c_str());
- std::cout << "step: "<<pathStep<<" cumulative: "<<pathSoFar << " ford:"
<< ford << std::endl;
+// std::cout << "step: "<<pathStep<<" cumulative: "<<pathSoFar << "
ford:" << ford << std::endl;
if (ford == 2) {
++step;
@@ -207,7 +203,8 @@
int
FileDataSource::walkPathG(const std::list<std::string>* strStack, const
unsigned int stackPos)
{
- std::string pathSoFar = "";
+ std::string fsPath = "";
+ std::string gPath = "";
std::string pathStep = "";
std::list<std::string>::const_iterator it = strStack->begin();
struct db_i *dbip;
@@ -220,35 +217,33 @@
for (int i = 0; i < stackPos; ++i)
{
pathStep = (std::string) *it;
- pathSoFar += pathStep;
+ fsPath += pathStep;
++it;
if (i != (stackPos-1))
- pathSoFar += "/";
+ fsPath += "/";
}
/* Open DB file */
- if ((dbip = db_open(pathSoFar.c_str(), "r")) == DBI_NULL) {
- perror(pathSoFar.c_str());
- bu_exit(1, "Unable to open geometry file (%s)\n", pathSoFar.c_str());
+ if ((dbip = db_open(fsPath.c_str(), "r")) == DBI_NULL) {
+ perror(fsPath.c_str());
+ bu_exit(1, "Unable to open geometry file (%s)\n", fsPath.c_str());
}
if (db_dirbuild(dbip)) {
bu_exit(1, "ERROR: db_dirbuild failed\n");
}
/* Assuming we are at TOPs here. */
- pathSoFar = "";
-
for (; it != strStack->end(); ++it)
{
pathStep = (std::string) *it;
- pathSoFar += pathStep;
+ gPath += pathStep;
- std::cout << "G step: " << pathStep << " cumulative: " << pathSoFar
- << " dbStep:" << dbStep << std::endl;
+// std::cout << "G: fsPath: " << fsPath
+// << " gPath:" << gPath << std::endl;
db_full_path_init(&dfp);
- exists = db_string_to_path(&dfp, dbip, pathSoFar.c_str());
+ exists = db_string_to_path(&dfp, dbip, gPath.c_str());
db_free_full_path(&dfp);
if (exists != 0) {
@@ -256,7 +251,7 @@
break;
}
- pathSoFar += "/";
+ gPath += "/";
++dbStep;
}
@@ -280,7 +275,7 @@
endPos = path.length();
}
sub = path.substr(0, endPos);
- std::cout << sub << std::endl;
+
if (sub.length() > 0) {
stringStack->push_back(sub);
++cnt;
@@ -292,7 +287,6 @@
return cnt;
}
-
/*
* Local Variables:
* tab-width: 8
Modified: geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx
===================================================================
--- geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx 2011-05-20 18:52:06 UTC
(rev 44650)
+++ geomcore/trunk/tests/func/GE/GeometryEngineTest.cxx 2011-05-23 12:57:07 UTC
(rev 44651)
@@ -84,7 +84,7 @@
std::string testName(gName);
int ret = FileDataSource::walkPath(testName);
- std::cout << "\nDone, got: " << ret << "\n" << std::endl;
+ std::cout << "\nDone, got: " << ret << " steps\n" << std::endl;
return 0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits