Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

task.hpp

Go to the documentation of this file.
00001 // PTF - Psychological Test Framework 00002 // http://ptf.sourceforge.net 00003 // 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU Library General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 #ifndef __TASK__ 00019 #define __TASK__ 00020 00021 #include <iostream> 00022 #include <vector> 00023 #include <ptf/core/timeinterval.hpp> 00024 00025 using std::vector; 00026 00041 class Task { 00042 public: 00043 Task(); 00044 Task(int, const timespec&, const timespec&, const timespec&, 00045 const TimeInterval&); 00046 Task(int, long int, long int, long int, long int, long int, long int, 00047 long int, long int, long int, long int); 00048 Task(const Task&); 00049 virtual ~Task(); 00050 virtual void prepare() {}; 00051 virtual void run() {}; 00052 virtual void finish() {}; 00053 int getId() const; 00054 timespec getWaitPrepareExecute() const; 00055 timespec getWaitExecuteFinish() const; 00056 timespec getWaitFinishNextTask() const; 00057 const TimeInterval& getReactionWindow() const; 00058 const vector<bool>& getSuccessfulReaction() const; 00059 void setReactionWindow(long int, long int, long int, long int); 00060 void setReactionWindow(const timespec&, const timespec&); 00061 void setReactionWindow(const TimeInterval&); 00062 void setWaitPrepareExecute(long int, long int); 00063 void setWaitExecuteFinish(long int, long int); 00064 void setWaitFinishNextTask(long int, long int); 00065 void setWaitPrepareExecute(const timespec&); 00066 void setWaitExecuteFinish(const timespec&); 00067 void setWaitFinishNextTask(const timespec&); 00068 void setSuccessfulReaction(const vector<bool>&); 00069 protected: 00070 int id; 00071 timespec waitPrepareExecute; 00072 timespec waitExecuteFinish; 00073 timespec waitFinishNextTask; 00074 TimeInterval reactionWindow; 00075 vector<bool> successfulReaction; 00076 }; 00077 00078 #endif

Generated on Fri Dec 17 14:54:23 2004 for Psychological Test Framework by doxygen 1.3.8