From: Dominic L. <ma...@us...> - 2005-01-02 14:44:40
|
Update of /cvsroot/robotflow/RobotFlow/Generic/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19423/Generic/include Modified Files: KDNode.h KDPQueue.h KDPoint.h KDTree.h Timer.h Log Message: removing all "using namespace std;" in headers. Bumped version to 0.2.6. Preparing for the RobotFlow namespace. Index: KDPQueue.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDPQueue.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** KDPQueue.h 23 Feb 2004 17:01:02 -0000 1.1 --- KDPQueue.h 2 Jan 2005 14:43:56 -0000 1.2 *************** *** 28,32 **** #include "KDPoint.h" - using namespace std; // Template class for node values --- 28,31 ---- *************** *** 82,86 **** out : output stream to print the object content */ ! void printOn(ostream &out) const { throw new GeneralException ("KDPQueue::printOn : routine not implemented",__FILE__,__LINE__); --- 81,85 ---- out : output stream to print the object content */ ! void printOn(std::ostream &out) const { throw new GeneralException ("KDPQueue::printOn : routine not implemented",__FILE__,__LINE__); *************** *** 95,99 **** in : input stream to read the object content */ ! void readFrom(istream &in) { throw new GeneralException ("KDPQueue::readFrom : routine not implemented",__FILE__,__LINE__); --- 94,98 ---- in : input stream to read the object content */ ! void readFrom(std::istream &in) { throw new GeneralException ("KDPQueue::readFrom : routine not implemented",__FILE__,__LINE__); Index: Timer.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/Timer.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Timer.h 8 Dec 2003 21:40:08 -0000 1.1 --- Timer.h 2 Jan 2005 14:43:56 -0000 1.2 *************** *** 10,14 **** #include <pthread.h> - using namespace std; //(ER) for debugging --- 10,13 ---- *************** *** 78,83 **** } ! virtual void printOn(ostream &out=cout) const { ! out<<"Timer : "<<m_remaining_time<<" msec"<<endl; } --- 77,82 ---- } ! virtual void printOn(std::ostream &out=std::cout) const { ! out<<"Timer : "<<m_remaining_time<<" msec"<<std::endl; } Index: KDNode.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDNode.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** KDNode.h 23 Feb 2004 17:01:02 -0000 1.1 --- KDNode.h 2 Jan 2005 14:43:56 -0000 1.2 *************** *** 27,31 **** #include "KDPQueue.h" - using namespace std; #define KDN_LOW 0 --- 27,30 ---- *************** *** 186,204 **** out : output stream to print the object content */ ! void printOn(ostream &out) const { ! out << "<KDNode " << endl; if (m_children[KDN_LOW] == NULL && m_children[KDN_HIGH] == NULL && m_bucket != NULL) { ! out << "<Type Leaf " << endl; ! out << "<NumPts " << m_nPts << " >" << endl; ! out << "<DimSize " << m_dimSize << " >" << endl; ! out << "<Bucket " << endl; for (int i=0; i<m_nPts; ++i) { m_bucket[i].printOn(out); } ! out << " >" << endl; out << "<BucketIdx "; --- 185,203 ---- out : output stream to print the object content */ ! void printOn(std::ostream &out) const { ! out << "<KDNode " << std::endl; if (m_children[KDN_LOW] == NULL && m_children[KDN_HIGH] == NULL && m_bucket != NULL) { ! out << "<Type Leaf " << std::endl; ! out << "<NumPts " << m_nPts << " >" << std::endl; ! out << "<DimSize " << m_dimSize << " >" << std::endl; ! out << "<Bucket " << std::endl; for (int i=0; i<m_nPts; ++i) { m_bucket[i].printOn(out); } ! out << " >" << std::endl; out << "<BucketIdx "; *************** *** 206,238 **** out << m_bucketIdx[i] << " "; } ! out << " >" << endl; ! out << " >" << endl; ! out << " >" << endl; } else { ! out << "<Type Internal " << endl; ! out << "<CutDim " << m_cutDim << " >" << endl; ! out << "<CutVal " << m_cutVal << " >" << endl; out << "<CutBounds " << m_cutBnds[0] << " " << m_cutBnds[1] ! << " >" << endl; if (m_children[KDN_LOW] != NULL) { ! out << "<LowChild " << endl; m_children[KDN_LOW]->printOn(out); ! out << " >" << endl; } if (m_children[KDN_HIGH] != NULL) { ! out << "<HighChild " << endl; m_children[KDN_HIGH]->printOn(out); ! out << " >" << endl; } ! out << " >" << endl; ! out << " >" << endl; } ! out << " >" << endl; } --- 205,237 ---- out << m_bucketIdx[i] << " "; } ! out << " >" << std::endl; ! out << " >" << std::endl; ! out << " >" << std::endl; } else { ! out << "<Type Internal " << std::endl; ! out << "<CutDim " << m_cutDim << " >" << std::endl; ! out << "<CutVal " << m_cutVal << " >" << std::endl; out << "<CutBounds " << m_cutBnds[0] << " " << m_cutBnds[1] ! << " >" << std::endl; if (m_children[KDN_LOW] != NULL) { ! out << "<LowChild " << std::endl; m_children[KDN_LOW]->printOn(out); ! out << " >" << std::endl; } if (m_children[KDN_HIGH] != NULL) { ! out << "<HighChild " << std::endl; m_children[KDN_HIGH]->printOn(out); ! out << " >" << std::endl; } ! out << " >" << std::endl; ! out << " >" << std::endl; } ! out << " >" << std::endl; } *************** *** 245,251 **** in : input stream to read the object content */ ! void readFrom(istream &in) { ! string tag; while (1) { --- 244,250 ---- in : input stream to read the object content */ ! void readFrom(std::istream &in) { ! std::string tag; while (1) { *************** *** 379,385 **** in : input stream to read the object content */ ! void readFromInternal(istream &in) { ! string tag; while (1) { --- 378,384 ---- in : input stream to read the object content */ ! void readFromInternal(std::istream &in) { ! std::string tag; while (1) { *************** *** 449,455 **** in : input stream to read the object content */ ! void readFromLeaf(istream &in) { ! string tag; while (1) { --- 448,454 ---- in : input stream to read the object content */ ! void readFromLeaf(std::istream &in) { ! std::string tag; while (1) { Index: KDPoint.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDPoint.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** KDPoint.h 23 Feb 2004 17:01:02 -0000 1.1 --- KDPoint.h 2 Jan 2005 14:43:56 -0000 1.2 *************** *** 25,29 **** #include <math.h> - using namespace std; // Template class for point coordinate --- 25,28 ---- *************** *** 165,180 **** out : output stream to print the object content */ ! void printOn(ostream &out) const { ! out << "<KDPoint " << endl; ! out << "<DimSize " << m_dimSize << " >" << endl; ! out << "<PointData " << endl; for (int d=0; d<m_dimSize; ++d) { ! out << (int)(m_point[d]) << endl; } ! out << " >" << endl; ! out << " >" << endl; } --- 164,179 ---- out : output stream to print the object content */ ! void printOn(std::ostream &out) const { ! out << "<KDPoint " << std::endl; ! out << "<DimSize " << m_dimSize << " >" << std::endl; ! out << "<PointData " << std::endl; for (int d=0; d<m_dimSize; ++d) { ! out << (int)(m_point[d]) << std::endl; } ! out << " >" << std::endl; ! out << " >" << std::endl; } *************** *** 187,193 **** in : input stream to read the object content */ ! void readFrom(istream &in) { ! string tag; while (1) { --- 186,192 ---- in : input stream to read the object content */ ! void readFrom(std::istream &in) { ! std::string tag; while (1) { Index: KDTree.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDTree.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** KDTree.h 23 Feb 2004 17:01:02 -0000 1.1 --- KDTree.h 2 Jan 2005 14:43:56 -0000 1.2 *************** *** 27,31 **** #include "KDPQueue.h" - using namespace std; // Template class for node values --- 27,30 ---- *************** *** 102,127 **** out : output stream to print the object content */ ! void printOn(ostream &out) const { ! out << "<KDTree " << endl; ! out << "<NumPts " << m_numPts << " >" << endl; ! out << "<DimSize " << m_dimSize << " >" << endl; ! out << "<BucketSize " << m_bucketSize << " >" << endl; ! out << "<BBoxLow " << endl; m_bboxLow.printOn(out); ! out << " >" << endl; ! out << "<BBoxHigh " << endl; m_bboxHigh.printOn(out); ! out << " >" << endl; if (m_root != NULL) { ! out << "<KDRoot " << endl; m_root->printOn(out); ! out << " >" << endl; } ! out << " >" << endl; } --- 101,126 ---- out : output stream to print the object content */ ! void printOn(std::ostream &out) const { ! out << "<KDTree " << std::endl; ! out << "<NumPts " << m_numPts << " >" << std::endl; ! out << "<DimSize " << m_dimSize << " >" << std::endl; ! out << "<BucketSize " << m_bucketSize << " >" << std::endl; ! out << "<BBoxLow " << std::endl; m_bboxLow.printOn(out); ! out << " >" << std::endl; ! out << "<BBoxHigh " << std::endl; m_bboxHigh.printOn(out); ! out << " >" << std::endl; if (m_root != NULL) { ! out << "<KDRoot " << std::endl; m_root->printOn(out); ! out << " >" << std::endl; } ! out << " >" << std::endl; } *************** *** 134,140 **** in : input stream to read the object content */ ! void readFrom(istream &in) { ! string tag; while (1) { --- 133,139 ---- in : input stream to read the object content */ ! void readFrom(std::istream &in) { ! std::string tag; while (1) { |