From: Dominic L. <ma...@us...> - 2005-03-29 15:21:36
|
Update of /cvsroot/robotflow/RobotFlow/Generic/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10496/Generic/include Modified Files: KDNode.h KDPQueue.h KDPoint.h KDTree.h Timer.h Log Message: Now using the RobotFlow namespace and the FD namespace Index: KDPQueue.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDPQueue.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDPQueue.h 2 Jan 2005 14:43:56 -0000 1.2 --- KDPQueue.h 29 Mar 2005 15:20:40 -0000 1.3 *************** *** 32,36 **** // IMPORTANT: class KDPQKey requires =, > operators template <class KDPQKey, class KDPQElement> ! class KDPQueue : public Object { public: --- 32,36 ---- // IMPORTANT: class KDPQKey requires =, > operators template <class KDPQKey, class KDPQElement> ! class KDPQueue : public FD::Object { public: *************** *** 83,87 **** void printOn(std::ostream &out) const { ! throw new GeneralException ("KDPQueue::printOn : routine not implemented",__FILE__,__LINE__); } --- 83,87 ---- void printOn(std::ostream &out) const { ! throw new FD::GeneralException ("KDPQueue::printOn : routine not implemented",__FILE__,__LINE__); } *************** *** 96,100 **** void readFrom(std::istream &in) { ! throw new GeneralException ("KDPQueue::readFrom : routine not implemented",__FILE__,__LINE__); } --- 96,100 ---- void readFrom(std::istream &in) { ! throw new FD::GeneralException ("KDPQueue::readFrom : routine not implemented",__FILE__,__LINE__); } Index: Timer.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/Timer.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Timer.h 2 Jan 2005 14:43:56 -0000 1.2 --- Timer.h 29 Mar 2005 15:20:40 -0000 1.3 *************** *** 10,19 **** #include <pthread.h> ! //(ER) for debugging extern timespec startTime; ! ! class Timer : public Object { friend void* timer_thread (void* timerPtr); --- 10,19 ---- #include <pthread.h> ! namespace RobotFlow { ! //(ER) for debugging extern timespec startTime; ! class Timer : public FD::Object { friend void* timer_thread (void* timerPtr); *************** *** 121,124 **** --- 121,125 ---- void thread_usleep( unsigned long a_ulNbrUs ); + }//namespace RobotFlow #endif Index: KDNode.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDNode.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDNode.h 2 Jan 2005 14:43:56 -0000 1.2 --- KDNode.h 29 Mar 2005 15:20:40 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- #include "KDPQueue.h" + namespace RobotFlow { #define KDN_LOW 0 *************** *** 35,39 **** // it should usually be either double, float, int, ... template <class KDData> ! class KDNode : public Object { public: --- 36,40 ---- // it should usually be either double, float, int, ... template <class KDData> ! class KDNode : public FD::Object { public: *************** *** 256,260 **** } else if (ch != '<') { ! throw new GeneralException ("KDNode::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } --- 257,261 ---- } else if (ch != '<') { ! throw new FD::GeneralException ("KDNode::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } *************** *** 270,274 **** readFromInternal(in); } ! catch (GeneralException *e) { throw e; } --- 271,275 ---- readFromInternal(in); } ! catch (FD::GeneralException *e) { throw e; } *************** *** 278,300 **** readFromLeaf(in); } ! catch (GeneralException *e) { throw e; } } else { ! throw new GeneralException ("KDNode::readFrom : unknown KDNode type",__FILE__,__LINE__); } } else { ! throw new GeneralException ("KDNode::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new GeneralException ("KDNode::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new GeneralException ("KDNode::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } --- 279,301 ---- readFromLeaf(in); } ! catch (FD::GeneralException *e) { throw e; } } else { ! throw new FD::GeneralException ("KDNode::readFrom : unknown KDNode type",__FILE__,__LINE__); } } else { ! throw new FD::GeneralException ("KDNode::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new FD::GeneralException ("KDNode::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new FD::GeneralException ("KDNode::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } *************** *** 390,394 **** } else if (ch != '<') { ! throw new GeneralException ("KDNode::readFromInternal : Parse error: '<' expected",__FILE__,__LINE__); } --- 391,395 ---- } else if (ch != '<') { ! throw new FD::GeneralException ("KDNode::readFromInternal : Parse error: '<' expected",__FILE__,__LINE__); } *************** *** 411,415 **** m_children[KDN_LOW]->readFrom(in); } ! catch (GeneralException *e) { throw e; } --- 412,416 ---- m_children[KDN_LOW]->readFrom(in); } ! catch (FD::GeneralException *e) { throw e; } *************** *** 421,439 **** m_children[KDN_HIGH]->readFrom(in); } ! catch (GeneralException *e) { throw e; } } else { ! throw new GeneralException ("KDNode::readFromInternal : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new GeneralException ("KDNode::readFromInternal : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new GeneralException ("KDNode::readFromInternal : Parse error: '>' expected ",__FILE__,__LINE__); } } --- 422,440 ---- m_children[KDN_HIGH]->readFrom(in); } ! catch (FD::GeneralException *e) { throw e; } } else { ! throw new FD::GeneralException ("KDNode::readFromInternal : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new FD::GeneralException ("KDNode::readFromInternal : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new FD::GeneralException ("KDNode::readFromInternal : Parse error: '>' expected ",__FILE__,__LINE__); } } *************** *** 460,464 **** } else if (ch != '<') { ! throw new GeneralException ("KDNode::readFromLeaf : Parse error: '<' expected",__FILE__,__LINE__); } --- 461,465 ---- } else if (ch != '<') { ! throw new FD::GeneralException ("KDNode::readFromLeaf : Parse error: '<' expected",__FILE__,__LINE__); } *************** *** 488,506 **** } } ! catch (GeneralException *e) { ! throw e->add(new GeneralException("In KDNode::readFromLeaf : ",__FILE__,__LINE__)); } } else { ! throw new GeneralException ("KDNode::readFromLeaf : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new GeneralException ("KDNode::readFromLeaf : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new GeneralException ("KDNode::readFromLeaf : Parse error: '>' expected ",__FILE__,__LINE__); } } --- 489,507 ---- } } ! catch (FD::GeneralException *e) { ! throw e->add(new FD::GeneralException("In KDNode::readFromLeaf : ",__FILE__,__LINE__)); } } else { ! throw new FD::GeneralException ("KDNode::readFromLeaf : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new FD::GeneralException ("KDNode::readFromLeaf : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new FD::GeneralException ("KDNode::readFromLeaf : Parse error: '>' expected ",__FILE__,__LINE__); } } *************** *** 789,791 **** --- 790,794 ---- }; + }//namespace RobotFlow + #endif Index: KDPoint.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDPoint.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDPoint.h 2 Jan 2005 14:43:56 -0000 1.2 --- KDPoint.h 29 Mar 2005 15:20:40 -0000 1.3 *************** *** 30,34 **** // it should usually be either double, float, int, ... template <class KDData> ! class KDPoint : public Object { public: --- 30,34 ---- // it should usually be either double, float, int, ... template <class KDData> ! class KDPoint : public FD::Object { public: *************** *** 198,202 **** } else if (ch != '<') { ! throw new GeneralException ("KDPoint::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } --- 198,202 ---- } else if (ch != '<') { ! throw new FD::GeneralException ("KDPoint::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } *************** *** 218,231 **** } else { ! throw new GeneralException ("KDPoint::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new GeneralException ("KDPoint::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new GeneralException ("KDPoint::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } --- 218,231 ---- } else { ! throw new FD::GeneralException ("KDPoint::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new FD::GeneralException ("KDPoint::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new FD::GeneralException ("KDPoint::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } Index: KDTree.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/include/KDTree.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KDTree.h 2 Jan 2005 14:43:56 -0000 1.2 --- KDTree.h 29 Mar 2005 15:20:40 -0000 1.3 *************** *** 27,36 **** #include "KDPQueue.h" ! // Template class for node values // IMPORTANT: class requires =, -, >, < operators // it should usually be either double, float, int, ... template <class KDData> ! class KDTree : public Object { public: --- 27,36 ---- #include "KDPQueue.h" ! namespace RobotFlow { // Template class for node values // IMPORTANT: class requires =, -, >, < operators // it should usually be either double, float, int, ... template <class KDData> ! class KDTree : public FD::Object { public: *************** *** 145,149 **** } else if (ch != '<') { ! throw new GeneralException ("KDTree::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } --- 145,149 ---- } else if (ch != '<') { ! throw new FD::GeneralException ("KDTree::readFrom : Parse error: '<' expected",__FILE__,__LINE__); } *************** *** 166,171 **** m_bboxLow.readFrom(in); } ! catch (GeneralException *e) { ! throw e->add(new GeneralException("In KDTree::readFrom : ",__FILE__,__LINE__)); } } --- 166,171 ---- m_bboxLow.readFrom(in); } ! catch (FD::GeneralException *e) { ! throw e->add(new FD::GeneralException("In KDTree::readFrom : ",__FILE__,__LINE__)); } } *************** *** 174,179 **** m_bboxHigh.readFrom(in); } ! catch (GeneralException *e) { ! throw e->add(new GeneralException("In KDTree::readFrom : ",__FILE__,__LINE__)); } } --- 174,179 ---- m_bboxHigh.readFrom(in); } ! catch (FD::GeneralException *e) { ! throw e->add(new FD::GeneralException("In KDTree::readFrom : ",__FILE__,__LINE__)); } } *************** *** 184,202 **** m_root->readFrom(in); } ! catch (GeneralException *e) { ! throw e->add(new GeneralException("In KDTree::readFrom : ",__FILE__,__LINE__)); } } else { ! throw new GeneralException ("KDTree::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new GeneralException ("KDTree::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new GeneralException ("KDTree::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } --- 184,202 ---- m_root->readFrom(in); } ! catch (FD::GeneralException *e) { ! throw e->add(new FD::GeneralException("In KDTree::readFrom : ",__FILE__,__LINE__)); } } else { ! throw new FD::GeneralException ("KDTree::readFrom : Unknown argument: " + tag,__FILE__,__LINE__); } if (!in) { ! throw new FD::GeneralException ("KDTree::readFrom : Parse error trying to build " + tag,__FILE__,__LINE__); } in >> tag; if (tag != ">") { ! throw new FD::GeneralException ("KDTree::readFrom : Parse error: '>' expected ",__FILE__,__LINE__); } } *************** *** 236,256 **** // Sanity check if (m_root == NULL) { ! throw new GeneralException ("KDTree::NNSearch : nearest neighbor search requires the KDTree to contain reference points. ",__FILE__,__LINE__); } if (i_qp == NULL) { ! throw new GeneralException ("KDTree::NNSearch : NULL query point. ",__FILE__,__LINE__); } if (o_nnDist == NULL) { ! throw new GeneralException ("KDTree::NNSearch : NULL nearest neighbor distances array. ",__FILE__,__LINE__); } if (o_nn == NULL) { ! throw new GeneralException ("KDTree::NNSearch : NULL nearest neighbor points array. ",__FILE__,__LINE__); } if (i_qp->GetDimSize() != m_dimSize) { ! throw new GeneralException ("KDTree::NNSearch : query point dimension size differs from KDTree reference points. ",__FILE__,__LINE__); } --- 236,256 ---- // Sanity check if (m_root == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : nearest neighbor search requires the KDTree to contain reference points. ",__FILE__,__LINE__); } if (i_qp == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : NULL query point. ",__FILE__,__LINE__); } if (o_nnDist == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : NULL nearest neighbor distances array. ",__FILE__,__LINE__); } if (o_nn == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : NULL nearest neighbor points array. ",__FILE__,__LINE__); } if (i_qp->GetDimSize() != m_dimSize) { ! throw new FD::GeneralException ("KDTree::NNSearch : query point dimension size differs from KDTree reference points. ",__FILE__,__LINE__); } *************** *** 260,264 **** if (i_numNN > m_numPts) { ! throw new GeneralException ("KDTree::NNSearch : cannot search for more nearest neighbors than the number of reference points in KDTree. ",__FILE__,__LINE__); } --- 260,264 ---- if (i_numNN > m_numPts) { ! throw new FD::GeneralException ("KDTree::NNSearch : cannot search for more nearest neighbors than the number of reference points in KDTree. ",__FILE__,__LINE__); } *************** *** 315,335 **** // Sanity check if (m_root == NULL) { ! throw new GeneralException ("KDTree::NNSearch : nearest neighbor search requires the KDTree to contain reference points. ",__FILE__,__LINE__); } if (i_qp == NULL) { ! throw new GeneralException ("KDTree::NNSearch : NULL query point. ",__FILE__,__LINE__); } if (o_nnDist == NULL) { ! throw new GeneralException ("KDTree::NNSearch : NULL nearest neighbor distances array. ",__FILE__,__LINE__); } if (o_nnIdx == NULL) { ! throw new GeneralException ("KDTree::NNSearch : NULL nearest neighbor indexes array. ",__FILE__,__LINE__); } if (i_qp->GetDimSize() != m_dimSize) { ! throw new GeneralException ("KDTree::NNSearch : query point dimension size differs from KDTree reference points. ",__FILE__,__LINE__); } --- 315,336 ---- // Sanity check if (m_root == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : nearest neighbor search requires the KDTree to contain reference points. ",__FILE__,__LINE__); } if (i_qp == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : NULL query point. ",__FILE__,__LINE__); } if (o_nnDist == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : NULL nearest neighbor distances array. ",__FILE__,__LINE__); ! } if (o_nnIdx == NULL) { ! throw new FD::GeneralException ("KDTree::NNSearch : NULL nearest neighbor indexes array. ",__FILE__,__LINE__); } if (i_qp->GetDimSize() != m_dimSize) { ! throw new FD::GeneralException ("KDTree::NNSearch : query point dimension size differs from KDTree reference points. ",__FILE__,__LINE__); } *************** *** 339,343 **** if (i_numNN > m_numPts) { ! throw new GeneralException ("KDTree::NNSearch : cannot search for more nearest neighbors than the number of reference points in KDTree. ",__FILE__,__LINE__); } --- 340,344 ---- if (i_numNN > m_numPts) { ! throw new FD::GeneralException ("KDTree::NNSearch : cannot search for more nearest neighbors than the number of reference points in KDTree. ",__FILE__,__LINE__); } *************** *** 717,719 **** --- 718,722 ---- }; + }//namespace RobotFlow + #endif |