Space Comps
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
src
multiqueue.h
1
#ifndef MULTIQUEUE_H
2
#define MULTIQUEUE_H
3
#include "particle.h"
4
#include "node.h"
5
#include <mutex>
6
#include <condition_variable>
7
8
class
MultiQueue
9
{
10
public
:
11
12
MultiQueue
();
13
~
MultiQueue
();
14
15
int
getSize();
16
std::mutex* getPositionMutex();
17
std::condition_variable* getQueueNotFull();
18
19
Node
* getHead();
20
Node
* getTail();
21
Node
* getNthInstance(
int
n,
Particle
* p);
22
Node
* popNthInstance(
int
n,
Particle
* p);
23
Node
* popFirstInstance(
Particle
* p);
24
Node
* getTimestepN(
int
n,
Particle
* p);
25
Node
* popTimestepN(
int
n,
Particle
* p);
26
Node
* pop();
27
28
void
pushHead(
Node
*);
29
void
pushTail(
Node
*);
30
31
private
:
32
Node
* head;
33
Node
* tail;
34
int
size;
35
36
std::mutex positionMutex;
37
std::condition_variable queueNotFull;
38
39
};
40
41
#endif // MULTIQUEUE_H
Node
The Node class contains a Position for a Particle in the MultiQueue.
Definition:
node.h:15
MultiQueue
Definition:
multiqueue.h:8
Particle
Definition:
particle.h:12
Generated on Sun Feb 23 2014 12:52:24 for Space Comps by
1.8.6