Go to the documentation of this file.00001
00022 #ifndef VIRTUAL_HARDWARE_TASK_H
00023 #define VIRTUAL_HARDWARE_TASK_H
00024
00025 #include <iostream>
00026 #include <map>
00027 using namespace std;
00028
00029 #include "hardwareTask.h"
00030
00031 class VirtualHwTask : public HwTask {
00032
00033 private:
00034 map<RBType, int> resourceMap;
00035 Device *device;
00036
00037 public:
00038
00039 VirtualHwTask(string n, vector<HwTask*> tasks, Device *dev) {
00040
00041 name = n;
00042 device = dev;
00043
00044
00045 for(int i = 0; i < (int) tasks.size(); i++) {
00046 map<RBType, int>::iterator it;
00047 map<RBType, int> res = tasks.at(i)->getResourceRequirementsPtr()->getPhysicalResources();
00048 for(it = res.begin(); it != res.end(); it++) {
00049 if(resourceMap[it->first] < it->second) resourceMap[it->first] = it->second;
00050 }
00051 }
00052
00053
00054
00055 resourceRequirements = new ResourceRequirements(resourceMap, device);
00056 }
00057
00058 void info();
00059
00060 };
00061
00062 #endif