Beispiel #1
0
void
AddKernelAction::act()
{
  if (_current_task == "add_kernel")
    _problem->addKernel(_type, _name, _moose_object_pars);
  else
  {
    if (getAllTasks().find("add_aux_bc") != getAllTasks().end())
      mooseWarning("The [AuxBCs] block is deprecated, all AuxKernels including both block and boundary restricted should be added within the [AuxKernels] block");

    _problem->addAuxKernel(_type, _name, _moose_object_pars);
  }
}
Beispiel #2
0
TaskGraph::~TaskGraph()
{
    TaskIterator i = getAllTasks();
    while (i.hasNext()) {
        i.next()->removeListener(this);
    }
}
Beispiel #3
0
void TaskGraph::taskStateChanged(ptr<Task> t, bool done, reason r)
{
    assert(allTasks.find(t) != allTasks.end());
    if (!done) {
        if (r != DATA_NEEDED) {
            Task::setIsDone(false, 0, r);

            // if the result of t is needed again but has not changed, the
            // tasks that depend on this result need not be reexecuted.
            // Otherwise we notify these successor tasks that one of their
            // dependencies has changed, and that they must be reexecuted:
            TaskIterator i = getInverseDependencies(t);
            while (i.hasNext()) {
                ptr<Task> s = i.next();
                s->setIsDone(false, 0, DEPENDENCY_CHANGED);
            }
        }
    } else {
        // updates the predecessor completion date of the successors of t
        completionDateChanged(t, t->getCompletionDate());

        // if a subtask of this task graph is now completed, the task graph
        // itself may become completed (it can of course not become uncompleted).
        TaskIterator i = getAllTasks();
        while (i.hasNext()) {
            if (!i.next()->isDone()) {
                return;
            }
        }
        Task::setIsDone(true, getCompletionDate());
    }
}
Beispiel #4
0
void TaskGraph::init(set<Task*> &initialized)
{
    if (initialized.find(this) == initialized.end()) {
        initialized.insert(this);
        TaskIterator i = getAllTasks();
        initTasks(i, initialized);
    }
}
Beispiel #5
0
//-----------------------------------------------------------------------------
// Active Window changed
//FIXME
void daisy::activeWindowChanged(WId id)
{
  Q_UNUSED(id);
  
  getAllTasks();
  if (!m_drawerscleared)clearDrawers();
  if (m_showindicons)emit update();
  
}
Beispiel #6
0
bool SqlStorage::setAllTasks( const User& user, const TaskList& tasks )
{
    SqlRaiiTransactor transactor(database());
    const TaskList oldTasks = getAllTasks();
    // clear tasks
    deleteAllTasks( transactor );
    // add tasks
    Q_FOREACH( Task task, tasks ) {
        task.setSubscribed( false );
        addTask( task, transactor );
    }
Beispiel #7
0
//-----------------------------------------------------------------------------
// HACK Delay updating task icon
void daisy::delayTaskIcoChange(void)
{
  m_uti_tmr->stop();
  TaskPtr task_tmp = TaskManager::TaskManager::self()->findTask( m_toupwid );
  if ( task_tmp )
  {
//     QIcon thumbnail;
//     thumbnail = KIcon( task_tmp->icon( m_icodimension, m_icodimension, true ) );
//     m_taskicons[showedTasks.indexOf( m_toupwid )]->setIcon(thumbnail);
    getAllTasks();
    emit update();
  }
}
Beispiel #8
0
void TaskGraph::setIsDone(bool done, unsigned int t, reason r)
{
    Task::setIsDone(done, t, r);
    if (!done) { // calls sub tasks recursively only if task must be reexecuted
        // if a dependency of this task graph has changed, then all sub tasks
        // must be reexecuted; otherwise, if the data produced by this graph
        // is needed again then, a priori, only the sub tasks without successors
        // must be reexecuted (these sub tasks may need other sub tasks to be
        // reexecuted if they need their data; in this case they can change
        // their execution state recursively in their own setIsDone method).
        TaskIterator i = r == DEPENDENCY_CHANGED ? getAllTasks() : getLastTasks();
        while (i.hasNext()) {
            i.next()->setIsDone(done, t, r);
        }
    }
}
Beispiel #9
0
Storage::~Storage()
{
	
	vector<Task*> timedTasks = getAllTasks();

	for(int i=0; i<timedTasks.size(); i++) {
		delete timedTasks[i];
		timedTasks[i] = NULL;
	}

	for(int i=0; i<floatTasks.size(); i++) {
		delete floatTasks[i];
		floatTasks[i] = NULL;
	}
	
	timedTasks.clear();
	floatTasks.clear();
}
Beispiel #10
0
vector<Item*> ItemBank::searchTasks(string keyword) {
	vector<Item*> allTasks;
	vector<Item*> tasksFound;

	allTasks = getAllTasks();

	for (vector<Item*>::iterator iter = allTasks.begin(); iter != allTasks.end(); iter++) {
		if (searchKeyword((*iter)->getTitle(), keyword)) {
			tasksFound.push_back(*iter);
		} else if (searchKeyword((*iter)->getDescription(), keyword)) {
			tasksFound.push_back(*iter);
		} else if (searchKeyword((*iter)->getVenue(), keyword)) {
			tasksFound.push_back(*iter);
		} else if (searchKeyword((*iter)->getCategory(), keyword)) {
			tasksFound.push_back(*iter);
		} else if (searchKeyword((*iter)->getPriorityInString(), keyword)) {
			tasksFound.push_back(*iter);
		}
	}

	return tasksFound;
}
void SchedTestParam::getSchedTestParam() {
  schedTestPramFile = fopen(name,"r+");
  if (schedTestPramFile==NULL){
    perror("could not open schedtestparam file");
    exit(EXIT_FAILURE);
  }

  // DO NOT CHANGE THE ORDER OF THE FOLLOWING BLOCK
  // START
  mhzCpuClock = getParam(cpuClockPos);
  cache_top = getCacheTopParam(cacheTopPos);
  cxs = getParam(cxsPos);
  sched = getParam(schedPos);
  sched2 = getParam(sched2Pos);
  release = getParam(releasePos);
  send_resched = getParam(send_reschedPos);
  release_latency = getParam(release_latencyPos);
  tick = getParam(tickPos);
  getAllTasks();
  // END  
  fclose(schedTestPramFile); 
  deleteSTFile();
}
Beispiel #12
0
void LaunchTestParam::getLaunchTestParam() {
	// printf("Trying to opne the following rt test config file  %s \n", rtConfigTestName);
	testParamF = fopen(testParamFN,"r+");

	// launchTestPramFile = fopen ("rttestconfigfile.rtg","r+");

	if (testParamF==NULL){
		perror("could not open launchtestparam file");
		exit(EXIT_FAILURE);
	}


	// FILE *f;
	// f = fopen ("rttestconfigfile.rtg","r+");
	// if (f==NULL) {
	// 	perror("Could not open rttestconfigfile.rtg");
	// 	exit(EXIT_FAILURE);
	// }

	// DO NOT CHANGE THE ORDER OF THE FOLLOWING BLOCK
	// START

	// mhzCpuClock = getParam(cpuClockPos);
	// cache_top = getCacheTopParam(cacheTopPos);
	// cxs = getParam(cxsPos);
	// sched = getParam(schedPos);
	// sched2 = getParam(sched2Pos);
	// release = getParam(releasePos);
	// send_resched = getParam(send_reschedPos);
	// release_latency = getParam(release_latencyPos);
	// tick = getParam(tickPos);
	getAllTasks();
	// END  
	fclose(testParamF); 
	// fclose (f);
}
Beispiel #13
0
//-----------------------------------------------------------------------------
// Window removed
//FIXME
void daisy::windowRemoved(WId id)
{
  if (!m_drawerscleared)clearDrawers();
  m_closingwindow = -1;
    
  KWindowInfo taskInfo = KWindowSystem::windowInfo( id, NET::WMName | NET::WMVisibleName , NET::WM2WindowClass );
  if ( m_alias.indexOf( taskInfo.windowClassName() ) != -1 )
  {
    m_closingwindow = m_alias.indexOf( taskInfo.windowClassName() );
    if ( m_showindicons )m_up_tmr->setInterval(1500);m_up_tmr->start();
  }
  else if ( m_alias.indexOf( QString(taskInfo.windowClassClass().toLower()) ) != -1 )
  {
    m_closingwindow = m_alias.indexOf( QString(taskInfo.windowClassClass().toLower()) );
    if ( m_showindicons )m_up_tmr->setInterval(1500);m_up_tmr->start();
  }
  else if ( m_alias.indexOf( taskInfo.name() ) != -1 )
  {
    m_closingwindow = m_alias.indexOf( taskInfo.name() );
    if ( m_showindicons )m_up_tmr->setInterval(1500);m_up_tmr->start();
  }
  else if ( m_alias.indexOf( taskInfo.visibleName() ) != -1 )
  {
    m_closingwindow = m_alias.indexOf( taskInfo.visibleName() );
    if ( m_showindicons )m_up_tmr->setInterval(1500);m_up_tmr->start();
  }
  
  else
  {
    getAllTasks();
  }
  
  
  if ( m_showindicons )emit update();
  
}