Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
mitkRoundRobinSchedulingAlgorithm.cpp
Go to the documentation of this file.
1
/*===================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center,
6
Division of Medical and Biological Informatics.
7
All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without
10
even the implied warranty of MERCHANTABILITY or FITNESS FOR
11
A PARTICULAR PURPOSE.
12
13
See LICENSE.txt or http://www.mitk.org for details.
14
15
===================================================================*/
16
17
#include "
mitkSchedulableProcess.h
"
18
#include "
mitkRoundRobinSchedulingAlgorithm.h
"
19
20
mitk::RoundRobinSchedulingAlgorithm::RoundRobinSchedulingAlgorithm
()
21
{
22
}
23
24
mitk::RoundRobinSchedulingAlgorithm::~RoundRobinSchedulingAlgorithm
()
25
{
26
}
27
28
mitk::SchedulableProcess
*
mitk::RoundRobinSchedulingAlgorithm::GetNextProcess
(std::vector<SchedulableProcess*>& processQueue)
29
{
30
size_t
numProcesses = processQueue.size();
31
32
if
(numProcesses == 0)
33
return
nullptr
;
34
35
mitk::SchedulableProcess
* process = processQueue[0];
36
37
if
(numProcesses > 1)
38
{
39
processQueue.erase(processQueue.begin());
40
processQueue.push_back(process);
41
}
42
43
return
process;
44
}
mitk::RoundRobinSchedulingAlgorithm::GetNextProcess
SchedulableProcess * GetNextProcess(std::vector< SchedulableProcess * > &processQueue) override
Definition:
mitkRoundRobinSchedulingAlgorithm.cpp:28
mitkRoundRobinSchedulingAlgorithm.h
mitk::RoundRobinSchedulingAlgorithm::~RoundRobinSchedulingAlgorithm
~RoundRobinSchedulingAlgorithm()
Definition:
mitkRoundRobinSchedulingAlgorithm.cpp:24
mitk::RoundRobinSchedulingAlgorithm::RoundRobinSchedulingAlgorithm
RoundRobinSchedulingAlgorithm()
Definition:
mitkRoundRobinSchedulingAlgorithm.cpp:20
mitk::SchedulableProcess
Definition:
mitkSchedulableProcess.h:25
mitkSchedulableProcess.h
git
MITK
Modules
Simulation
mitkRoundRobinSchedulingAlgorithm.cpp
Generated on Fri Feb 3 2017 20:52:07 for Medical Imaging Interaction Toolkit by
1.8.9.1