allocation.h
Go to the documentation of this file.
00001 #ifndef _MRTA_ALLOCATION_H_
00002 #define _MRTA_ALLOCATION_H_
00003 
00004 #include <QVector>
00005 #include <QObject>
00006 #include "mrta/taxonomy.h"
00007 
00008 namespace mrta
00009 {
00010 class Problem;
00011 class Robot;
00012 class Task;
00013 class Allocation : public QObject
00014 {
00015   Q_OBJECT
00016 public:
00017   enum State
00018   {
00019     OnHold,
00020     Assigned,
00021     Done
00022   };
00023   typedef Taxonomy::AllocationType Type;
00024   Allocation(Problem* problem, Task* task,
00025              const QVector<Robot*>& robots = QVector<Robot*>());
00026   virtual ~Allocation();
00027   QString getId() const;
00028   Task* getTask() const;
00029   QVector<Robot*> getRobots() const;
00030   void setRobots(const QVector<Robot*>& robots);
00031   void setState(State state);
00032 
00033 signals:
00034   void changed();
00035   void stateChanged(int state);
00036 
00037 private:
00038   QString id_;
00039   Type type_;
00040   State state_;
00041   Task* task_;
00042   QVector<Robot*> robots_;
00043 
00044 private slots:
00045   void robotStateChanged(int state);
00046   void taskStateChanged(int state);
00047 };
00048 }
00049 
00050 #endif // _MRTA_ALLOCATION_H_


rqt_mrta
Author(s): Adriano Henrique Rossette Leite
autogenerated on Thu Jun 6 2019 18:50:52