00001 //###################################################################### 00002 // 00003 // GraspIt! 00004 // Copyright (C) 2002-2009 Columbia University in the City of New York. 00005 // All rights reserved. 00006 // 00007 // GraspIt! is free software: you can redistribute it and/or modify 00008 // it under the terms of the GNU General Public License as published by 00009 // the Free Software Foundation, either version 3 of the License, or 00010 // (at your option) any later version. 00011 // 00012 // GraspIt! is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with GraspIt!. If not, see <http://www.gnu.org/licenses/>. 00019 // 00020 // Author(s): Matei T. Ciocarlie 00021 // 00022 // $Id: timeTest.h,v 1.8 2009/04/01 13:52:34 cmatei Exp $ 00023 // 00024 //###################################################################### 00025 00026 #include "simAnnPlanner.h" 00027 #include <time.h> 00028 00029 class Hand; 00030 class Body; 00031 00037 00038 class TimeTester : public SimAnnPlanner 00039 { 00040 private: 00041 void mainLoop(); 00042 protected: 00043 int mCount,mIllegalCount; 00044 public: 00045 TimeTester(Hand *h) : SimAnnPlanner(h){} 00046 virtual PlannerType getType(){return PLANNER_TIME_TEST;} 00047 00048 void startPlanner(); 00049 int getCount(){return mCount;} 00050 int getIllegal(){return mIllegalCount;} 00051 }; 00052 00054 class MTTester : public TimeTester 00055 { 00056 private: 00057 TimeTester *startChild(); 00058 std::vector<TimeTester*> mChildren; 00059 void mainLoop(){} 00060 public: 00061 MTTester(Hand *h) : TimeTester(h){} 00062 void startPlanner(); 00063 void pausePlanner(); 00064 };